[MAGNOLIA-1433] cache: use original url as caching k Created: 21/Mar/07  Updated: 23/Jan/13  Resolved: 27/Apr/07

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0.2
Fix Version/s: 3.1 M1

Type: Improvement Priority: Major
Reporter: Philipp Bärfuss Assignee: Sameer Charles
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)
Date of First Response:

 Description   

The current cache implementation uses the set uri (after virtual uri mapping), caching does then not work if you put parameters into the path part of the url

/en/somthing.html --> /somthing?lang=en



 Comments   
Comment by Sameer Charles [ 18/Apr/07 ]

Key is derived from Path.getURI(request) which gives you the original URI independent of multiple dispatches in between.
But if you are redirecting using "redirect:/PATH" then its a new request and will be ignored by cache since it contains parametes which is an
expected behaviour.

Comment by Philipp Bracher [ 27/Apr/07 ]

The problem was that the virtual uri mapping resets this value. Now we have to methods:

  • Path.getURI() --> the uri after the manipulations (virtual uri mapping, i18n,...)
  • Path.getOriginalURI() --> is never resetted
Generated at Mon Feb 12 03:26:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.