[MAGNOLIA-5108] GZIP response when threshold for in-memory caching is reached Created: 12/Jun/13  Updated: 31/Oct/13  Resolved: 19/Jul/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.5.10

Type: Bug Priority: Major
Reporter: Milan Divilek Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLCACHE-15 CLONE - GZIP response when threshold ... Closed
relation
is related to MAGNOLIA-5369 uncached file which is bigger than in... Closed
is related to MGNLCACHE-25 CLONE - uncached file which is bigger... 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   

When threshold for in-memory caching is reached then response will not be cached and response is directly streamed to user. See info.magnolia.module.cache.filter.CacheResponseWrapper.ThresholdingCacheOutputStream.thresholdReached(). Then response is not GZIPed.
info.magnolia.module.cache.filter.GZipFilter.GZipCacheResponseWrapper should not extend info.magnolia.module.cache.filter.CacheResponseWrapper.



 Comments   
Comment by Jan Haderka [ 18/Jul/13 ]

GZipCacheResponseWrapper extends CacheResponseWrapper but in CatchResponseWrapper.thresholdReached() method you check whether current class is instance of subclass - GZipCacheResponseWrapper. I don't think that this is very clear nor maintainable. Why don't you extend said method in the subclass instead to do what you need?

Comment by Jaroslav Simak [ 18/Jul/13 ]

Method thresholdReached() is in ThresholdingCacheOutputStream which is inner class of CacheResponseWrapper - so i can't override that method in GzipCacheResponseWrapper.

Generated at Mon Feb 12 04:02:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.