[MGNLRESTCL-45] Cache a REST response Created: 14/Feb/19 Updated: 09/Apr/20 Resolved: 23/Oct/19 |
|
| Status: | Closed |
| Project: | REST Client |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0 |
| Type: | Story | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Quach Hao Thien |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 19d 5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Release notes required: |
Yes
|
||||||||
| Documentation update required: |
Yes
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Declarative REST clients | ||||||||
| Sprint: | Declarative REST 6, Declarative REST 7, Declarative REST 8, Declarative REST 9 | ||||||||
| Story Points: | 8 | ||||||||
| Description |
A developer does not want to make too many requests to a remote system, for example if I am hitting a CRM to get information about the current visitor - I dont want to make the REST request everytime the visitor visits a new page. Also API's can be pay-per-request, or can throttle requests, so making fewer requests can also save money. Acceptance Criteria:
Scenarios: https://wiki.magnolia-cms.com/display/TEASYINT/EasyRest+Cache+Thinking |
| Comments |
| Comment by Quach Hao Thien [ 08/Oct/19 ] |
Basically, the cache will base on the time-to-live value to automatically remove the expired cache entry, but for timeout fallback case, we have to ignore the time-to-live and use an expire time (in seconds) as a property of cache entry, that mean the cache entries will never be removed automatically, until restart server or invoke cache.clear() manually. To overcome this drawback we can have a time-to-live alongs with expire time, but it may confuse the user.
cacheConfiguration: expireIn: 60 timeToLive: 86400
or we can implicitly declare it in the back-end and apply for all cache entries of REST client. What do you think?
|