[MGNLCACHE-193] Increase expiration of browser cache policy Created: 14/Dec/17 Updated: 07/May/20 Resolved: 07/May/20 |
|
| Status: | Closed |
| Project: | Cache Modules |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Pierre Sandrin | Assignee: | Unassigned |
| Resolution: | Not an issue | Votes: | 1 |
| Labels: | quickwin | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 8m | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Patch included: |
Yes
|
| 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)
|
| Description |
|
The property 'expirationMinutes' is set to 60 for resources and 10 for default. This is very short and causes the browser to reload the files unnecessarily. Google page insights rates this badly (see attachment) and suggests to set it to at least a week. I suggest to increase the values in the default configuration to 10080 (one week).
Test have shown that the files are served again from the server if they changed and the cache was cleared. So theres no need to keep the expiration low. |
| Comments |
| Comment by Pierre Sandrin [ 20/Dec/17 ] |
|
I recognized that this does not work for normal resouces. If a resource changes the user would get the resource from the browser cache for a whole week without even checking if the file has changed. If we have resources that never change (I.E js-libraries, files with a hash in the filename) we rename them with a .cache. in the middle (I.E. myjs.cache.js or usd9asuda9hd.cache.js) and the far future policy of Magnolia sets the expiry to a year. |