refactor: make some variables private in struct & allow limiting cache size & CacheByRequestBody
Some variable should be private in struct because you may replace it by other ones.
CacheByRequestBody is interesting. And I left some code review in this pr~
Codecov Report
Merging #26 (887cd09) into main (b885ae3) will increase coverage by
0.42%. The diff coverage is61.53%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.
@@ Coverage Diff @@
## main #26 +/- ##
==========================================
+ Coverage 63.33% 63.76% +0.42%
==========================================
Files 5 5
Lines 270 287 +17
==========================================
+ Hits 171 183 +12
- Misses 86 90 +4
- Partials 13 14 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 63.76% <61.53%> (+0.42%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files Changed | Coverage Δ | |
|---|---|---|
| persist/redis.go | 0.00% <0.00%> (ø) |
|
| persist/memory.go | 83.33% <57.14%> (-7.58%) |
:arrow_down: |
| cache.go | 71.95% <80.00%> (+0.81%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@chenyahui I have just updated my PR, please review it.