The sfViewCacheManager creates cache keys based on parameters that
appear in the request. Is there any way to apply some custom
parameters to each cached action, component and/or partial, without
messing with the internal uri?

For example, I keep currently selected language and time zone for a
visitor in the user session, so these values are not included as
parameters in each request. But off course I want Symfony to generate
and cache content for each combination of language and time zone
differently.

My findings:
If I would add the language and timezone to the sfRequest parameters,
sfRouting will complain while generating the internal URI because my
routes do not include these parameters.
So that is not an option. It also does not appear to be possible to
extend sfViewCacheManager, because sfViewCacheManager is hardcoded in
sfFactoryConfigHandler and not overridable with a value in
factories.yml. I wonder why that is? Even if I could extend it I would
have to override each method that accepts an internal uri argument, in
order to secretly add my language and timezone parameters to it.
Finally http vary headers did also not help.

So I am stuck here, the cache mechanism looks very flexible in where
to cache content (file, memory, database, etc.) by setting a custom
view_cache class. But not flexible in "how" to determine cache keys. I
surely hope someone can help me out?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to