Magnolia CacheFilter shoudn't write content twice for non-cached pages
----------------------------------------------------------------------

                 Key: MAGNOLIA-3987
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3987
             Project: Magnolia
          Issue Type: Bug
      Security Level: Public
          Components: cache
    Affects Versions: 4.4.6
         Environment: Linux
            Reporter: Alexey Tokarenko
         Attachments: encoding.jpg

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
{code:java}
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;
        }
{code}

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

As a result response contains doubled data.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to