[MGNLCACHE-164] Browser cache policy "never" is too broad Created: 18/Jan/17  Updated: 17/Mar/17  Resolved: 27/Jan/17

Status: Closed
Project: Cache Modules
Component/s: browser cache
Affects Version/s: 5.5.1
Fix Version/s: 5.5.2

Type: Improvement Priority: Major
Reporter: Antti Hietala Assignee: Roman Kovařík
Resolution: Fixed Votes: 1
Labels: browser, cache
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File linksWithoutTimestamp.txt    
Issue Links:
Relates
relates to MGNLDAM-568 ImagingBasedAssetRenderer should not ... Closed
relates to MAGNOLIA-6977 CK editor image not updated after edi... 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)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Sprint: Kromeriz 80
Story Points: 3

 Description   

The browser cache policy never is too broad. It prevents the browser from caching image thumbnails in the Assets app and preview images in the asset chooser. Users may experience this as slow performance. The browser reloads thumbnails every time the user expands/collapses an asset folder, which causes delay and feels frustrating.

To reproduce:

  1. Go to https://demo.magnolia-cms.com/
  2. Open the Assets app.
  3. Expand the /tours folder. Image thumbnails are generated and loaded.
  4. Collapse and expand the folder again. Image thumbnails are loaded again.

The never policy configuration was introduced Magnolia 5.5.1 (MGNLCACHE-12). The purpose was to address an issue (MGNLUI-3769) where a user adds an image in CKEditor, then crops the image in Assets, but doesn't see the edit reflected in CKEditor.

Proposal: Remove the never policy and introduce a more specific policy
CKEditor issue should be solved without impacting image thumbnails and previews in the Assets app, see MGNLUI-3769.

/modules/cache/config/contentCaching/defaultPageCache/browserCachePolicy/policies/never



 Comments   
Comment by Roman Kovařík [ 25/Jan/17 ]

Links without a timestamp:

  • assets linked from CKEditor
    (info.magnolia.dam.app.ui.field.factory.AssetsEnabledRichTextFieldFactory#createFieldComponent)
    • /dam/jcr:a1918662-8cbe-4346-ac5a-1b24a9950e2b/magnolia-logo.png
  • Vaadin resources
    • /magnoliaTestPublic/VAADIN/vaadinBootstrap.js (this one comes from vaadin directly, so we can cache it in browser)
    • /magnoliaTestPublic/VAADIN/themes/admincentral/styles.css (This might be changing, is not caching in the dev mode enough? What about clearing the browser cache when new magnolia version is deployed?)
  • /magnoliaTestPublic/VAADIN/widgetsets/info.magnolia.widgetset.MagnoliaProWidgetSet/info.magnolia.widgetset.MagnoliaProWidgetSet.nocache.js
Comment by Roman Kovařík [ 03/Feb/17 ]

MGNLDAM-568 removed fingerprint from dam links which I think is wrong.

We should not add timestamps to those links but should rather rely on any info.magnolia.imaging.caching.CachingStrategy from the imaging-module.

This doesn't solve browser caching at all a should be reverted.

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