Automatically closed - issue fixed for 2 weeks with no activity.
Automatically closed - issue fixed for 2 weeks with no activity.
- ๐ณ๐ฑNetherlands bbrala Netherlands
I recently discussed thie with catch.
Using the header and vary on that is very dangerous for cache purposes. It will make very very many variations, which results in bad caching and performance. Not to mention possible memroy issues in caches or high cache trashing.
We did think about how we could possible work around that.
What if;
We normalize the prermutation of the language into the resulting language, and cache that normalization and the resulting language.
So perhaps a site with en_EN and fr_FR. A browser comes along and tells the site "Hi i'm
en-GB,en-US;q=0.9,en;q=0.8
". The site would find out what this will end up as soen-GB,en-US;q=0.9,en;q=0.8
magic =>en_EN
, we cache this and threat serve cache asifen_EN
. This would mean (at least on the drupal side) only the records for inLang => outLang exist, which are pretty small and we dont end up with loads of difference permutations.Not entirely sure how we would implement that, but feels like a way to have drupal cache be happy.
The little devil on my shoulder also has a voice though. Which does tell me this is kinda a. can of worms as this could also easily break caching on the caches in front of Drupal, be it varnisch or maybe smoething like cloudflare. That is kinda the scary part. Perhaps contrib is better to have this live, instead of trying to get this into core.