[MSITEMESH-59] cache does not work properly Created: 05/Dec/22  Updated: 23/Oct/23  Resolved: 10/Feb/23

Status: Closed
Project: SiteMesh
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.1

Type: Bug Priority: Neutral
Reporter: Sergio Marino Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1d 2.5h Time Spent: 1d 0.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File cached data.png    
Issue Links:
Relates
relates to MSITEMESH-64 DOC: Cache issues when component is b... Closed
relates to MSITEMESH-65 Make module compatible with JAVA 11/1... Closed
causality
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MSITEMESH-60 Implementation Sub-task Completed Milan Divilek  
MSITEMESH-61 Review Sub-task Closed Roman Kovařík  
MSITEMESH-62 preintQA Sub-task Closed Oanh Thai Hoang  
MSITEMESH-63 QA Sub-task Completed Canh Nguyen  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: Support
Sprint: DevX 30
Story Points: 3
Team: DeveloperX
Work Started:

 Description   

Steps to reproduce

  1. demopublic --> set cache to false (authenticated) - so to test caching in same browser session
    https://demopublic.magnolia-cms.com/.magnolia/admincentral#app:configuration:browser;/modules/cache/config/contentCaching/defaultPageCache/cachePolicy/shouldBypassVoters/deny/authenticated@enabled:treeview:
  2. set dynamic fragment (bypass cache config for tourCarousel component
    https://demopublic.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/tours/templates/components/tourCarousel.yaml:edit
    fragmentDefinition:
      class: info.magnolia.module.advancedcache.rendering.DynamicFragmentDefinition
      ttl: 0
      mechanism: sitemesh
      dynamic: true 
    
  1. set date / time content for testing cache
    https://demopublic.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/tours/templates/components/tourCarousel.ftl:edit
    On top of ftl:
    [#assign now = .now /]
    [#assign time = now?time /]
        <h2>${time}</h2> 
    
  1. Initially node https://demopublic.magnolia-cms.com/.magnolia/admincentral#app:configuration:browser;/server/rendering/engine/listeners/personalizedComponent:treeview: is enabled - after some refreshes of homepage (https://demopublic.magnolia-cms.com/) you will see that date content is cached (which should not)
  2. Create property enabled: false – module will be restarted and after some new refreshes you will notice that date content is now bypassed (expected behavior)

.. Logs, screenshots, gifs...

Expected results

Content should not get cached at step 4 and the time displays the current time

Actual results

Content gets cached at step 4 and the time displays the old time

Workaround

Development notes


Generated at Mon Feb 12 10:57:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.