[MGNLCACHE-46] Magnolia CacheFilter shoudn't write content twice for non-cached pages Created: 01/Mar/12  Updated: 25/Mar/22  Resolved: 25/Mar/22

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

Type: Bug Priority: Neutral
Reporter: Alexey Tokarenko Assignee: Unassigned
Resolution: Inactive Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Attachments: JPEG File encoding.jpg    
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   

For html pages that uses no-cache html headers getMaxAgeInSeconds returns 0 from ResponseExpirationCalculator. This causes double replay of content in Store & UseCache executors

info.magnolia.module.cache.executor.Store

if (timeToLiveInSeconds == 0) {
            // put null to unblock the cache
            cache.put(key, null);

            // stream the response directly
            cachedEntry.replay(request, response, chain);
            response.flushBuffer();

            return;
        }

UseCache:

 if (cached != null) {
            cached.replay(request, response, chain);
            response.flushBuffer();
        } else {
            // not modified (304) or nothing to write to the output
        }

As a result response contains doubled data.



 Comments   
Comment by Alexey Tokarenko [ 01/Mar/12 ]

Seems like regress issue in 4.4.6

Comment by Roman Kovařík [ 07/Nov/14 ]

Obsolete on 5.3.x branch (see MGNLCACHE-57). To be verified on older branches.

Comment by Christopher Zimmermann [ 25/Mar/22 ]

Closing as inactive..

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