[SOLVED] getViewCacheManager non-object error

Discussion specific to symfony 1.1.x stable

[SOLVED] getViewCacheManager non-object error

Postby pieter333 » Sun Aug 10, 2008 11:23 pm

Hi,

I want to put some stuff into the cache inside an action.

I tried:

Code: Select all
$cacheManager = sfContext::getInstance()->getViewCacheManager();
$cacheManager->set('something');


or

Code: Select all
$this->getContext()->getViewCacheManager()->set('something');


But with both situations I get "Fatal error: Call to a member function set() on a non-object in ...." :x

If I read the documentation I guess the above code is correct, or can somebody tell me what I do wrong?

Thnx!!

Pieter
Last edited by pieter333 on Mon Aug 18, 2008 2:17 pm, edited 1 time in total.
pieter333
Member
 
Posts: 56
Joined: Wed Aug 15, 2007 6:04 pm
Location: Netherlands

Re: getViewCacheManager non-object error

Postby pieter333 » Mon Aug 11, 2008 10:43 am

Anyone?
pieter333
Member
 
Posts: 56
Joined: Wed Aug 15, 2007 6:04 pm
Location: Netherlands

Re: getViewCacheManager non-object error

Postby pieter333 » Wed Aug 13, 2008 10:05 am

?
pieter333
Member
 
Posts: 56
Joined: Wed Aug 15, 2007 6:04 pm
Location: Netherlands

Re: getViewCacheManager non-object error

Postby pieter333 » Mon Aug 18, 2008 2:17 pm

Nevermind, I know the problem now, I forgot to turn on caching in the development environment.
pieter333
Member
 
Posts: 56
Joined: Wed Aug 15, 2007 6:04 pm
Location: Netherlands

Re: [SOLVED] getViewCacheManager non-object error

Postby pedrocasado » Sun Mar 10, 2013 8:47 pm

thanks!
pedrocasado
Junior Member
 
Posts: 9
Joined: Sat Dec 11, 2010 12:18 am


Return to symfony 1.1

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron