[MULTISITE-177] Allow custom cache keys in the MultiSiteManager Created: 04/Apr/23  Updated: 04/Apr/23

Status: Open
Project: Magnolia Multisite Module
Component/s: None
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
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)

 Description   

Currently MultiSiteManager uses domain + uri as the key for the internal site cache. With the addition of Live Copy there might be use cases where you have multiple trees being served on the same domain. Without the ability to customize the key it can create conflicts when trying to request content which might be the same in domain and uri but different in other aspects.

Consider a rest call to a workspace which uses a single-tree-multi-language configuration:

https://www.site.com/.rest/endpointPath/{path}?lang=de
https://www.site.com/.rest/endpointPath/{path}?lang=en

An improvement would be to take the same approach as the Cache module where the entire AggregationState object is passed to a cache key generator. The domain and uri would still be available through the AggState object but would also allow an easier entry point for custom keys. Currently in the MultiSiteFilter we already are getting this data from the AggState.

Notes
The multisite module needs a new configuration for the cache key generator class.


Generated at Mon Feb 12 06:07:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.