Re: [symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-20 Thread Nicolas CHARLOT
Le 20 janv. 2010 à 12:06, AlexT a écrit : > Sure it will cycle, you must prevent that changing settings temporary. > Kind of: > > > $oldcallable = sfConfig::get('sf_cache_namespace_callable'); > sfConfig::set('sf_cache_namespace_callable', null); //disable cycling > call

Re: [symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-20 Thread AlexT
Sure it will cycle, you must prevent that changing settings temporary. Kind of: $oldcallable = sfConfig::get('sf_cache_namespace_callable'); sfConfig::set('sf_cache_namespace_callable', null); //disable cycling call $key = $viewCacheManager->generateCacheKey($internalUri,

Re: [symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-20 Thread Nicolas CHARLOT
Le 17 janv. 2010 à 22:45, Ali a écrit : > I think it's better to override generateCacheKey function in > ViewCacheManager. > > To do this you need to declare 'sf_cache_namespace_callable' config > value and set it to your function name, which will alter the key > depending on the user session par

[symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-19 Thread Ali
I think it's better to override generateCacheKey function in ViewCacheManager. To do this you need to declare 'sf_cache_namespace_callable' config value and set it to your function name, which will alter the key depending on the user session parameters (you can get the initial key by calling orig

Re: [symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-18 Thread Nicolas CHARLOT
Le 18 janv. 2010 à 13:57, Massimiliano Arione a écrit : > Nicholas, IMHO your solution is good. > I don't know any other solution for a such problem. > Why do you say that a double cache is not necessary? Indeed, it's > exactly what you need! Most of my actions are identical for members and anony

[symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-18 Thread ken
You can probably set up a filter to check for settings in cache.yml. like add a boolean setting but you will also need to override sfCacheConfigHandler to persist the setting into the cache. On Jan 18, 8:57 pm, Massimiliano Arione wrote: > On 18 Gen, 10:05, Nicolas CHARLOT wrote: > > > > > > >

[symfony-users] Re: Best way to get 2 cache versions : anonymous / authenticated users

2010-01-18 Thread Massimiliano Arione
On 18 Gen, 10:05, Nicolas CHARLOT wrote: > I need to store 2 versions of a same action depending on user status > (authenticated and member or not). > > The solution I founded was to write my own viewCacheManager: > It works but all actions are cached twice and it's not necessary. I'm looking >