[MGNLCACHE-212] refreshOnNoCacheRequests does not work with memcached backend Created: 10/Jun/19 Updated: 30/Mar/23 |
|
| Status: | Open |
| Project: | Cache Modules |
| Component/s: | memcached |
| Affects Version/s: | 5.6.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Neeraj Verma | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Epic Link: | Support |
| Description |
|
Looking at the code, there is an option to refresh the cached entry by passing no-cache header. But it seems when used with memcached backend, this has no effect.
The underlying issue is, memcached library is calling .add() method, which will only add data if the key does not exist already. Instead it should use .set(), which supports updating the cached data if key already exists. The method is called here: https://git.magnolia-cms.com/projects/MODULES/repos/cache/browse/magnolia-cache-memcached/src/main/java/info/magnolia/cache/memcached/spy/MemcachedWrapper.java#191 |