[MGNLCACHE-54] CLONE - uuid-cache key mapping is not updated Created: 13/Feb/14  Updated: 04/Mar/14  Resolved: 18/Feb/14

Status: Closed
Project: Cache Modules
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.3

Type: Bug Priority: Critical
Reporter: Christoph Meier Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: maintenance, quickwin
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-5676 uuid-cache key mapping is not updated Closed
dependency
is depended upon by MGNLCMNT-94 make sure commenting works with anony... Closed
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
Date of First Response:

 Description   

Cache key - uuid mapping is not kept in sync anymore. Actually it's not created at all. The UUID-cache-key cache is always empty. Due to this problem it's not possible to flush pages w/ comments from the cache in timely manner.

The issue is caused by call to MgnlContext.getAggregationState().getCurrentContent() in {{ info.magnolia.module.cache.executor.Store.processCacheRequest(HttpServletRequest, HttpServletResponse, FilterChain, Cache, CachePolicyResult)}} which seems to always return null now, while previously it returned the page content.

Quick solution is to change this call to invoke getMainContent() instead, the ultimate fix for the problem is to remove usage of deprecated API all together.



 Comments   
Comment by Magnolia International [ 17/Feb/14 ]

Going from return getModule() to Components.getComponent(ModuleRegistry.class) to avoid calling a deprecated method isn't the way to go. The method in question actually invites you to use injection.

Comment by Magnolia International [ 17/Feb/14 ]

Cheers
Since that method's been deprecated since 4.5, we might as well remove it.

Generated at Sun Feb 11 23:51:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.