Im having problems too...
this line :
$cacheManager = sfContext::getInstance()->getViewCacheManager();
returns null!
On Wed, Oct 1, 2008 at 10:38 AM, Alex Filatov <[EMAIL PROTECTED]> wrote:
>
> Small addition:
>
> From that example code I'm using the following lines only
>
> $cacheManager = sfContext::getInstance()->getViewCacheManager();
> $cacheManager->addCache('moduleName', 'index');
>
> After that cache data wont appear in cache directory :(
>
> On Oct 1, 4:35 pm, Alex Filatov <[EMAIL PROTECTED]> wrote:
> > Hello!
> >
> > I'm writing unit tests with lime and I need to have all modules
> > settings to be cached (to reach them with sfConfig), like it executed
> > in common way via get request.
> >
> > How can I manage this?
> >
> > I've followed by chapter 12
> http://www.symfony-project.org/book/1_0/12-Caching
> > and there is an example:
> >
> > [code]
> > class conditionalCacheFilter extends sfFilter
> > {
> > public function execute($filterChain)
> > {
> > $context = $this->getContext();
> > if (!$context->getUser()->isAuthenticated())
> > {
> > foreach ($this->getParameter('pages') as $page)
> > {
> > $context->getViewCacheManager()->addCache($page['module'],
> > $page['action'], array('lifeTime' => 86400));
> > }
> > }
> >
> > // Execute next filter
> > $filterChain->execute();
> > }}
> >
> > [/code]
> >
> > But this doesn't work in test file.
> >
> > The question is - how can I generate cache data of particular module
> > settings (mod_*) from unit-test file or batch script.
> >
> > Thank you!
> >
>
--
Att,
Pedro Casado
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---