Answer the question
In order to leave comments, you need to log in
How to reset the cache in yii 1.1.16?
Good afternoon!
How to reset the cache in yii by the passed key?
Yii::app()->cache->delete($key) - doesn't
flush But Yii::app()->cache->flush() flushes. But all at once.
I want to make it possible to reset only a certain cache.
I use beginCache(). I pass there the key id, duration and depency with the CDbCacheDependency class.
In a config I use CFileCache
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Colleagues, in short, for COutputCache it worked.
And if there is a problem, then you can stupidly, on the page where the cache is used, display:
echo '<pre>';
print_r($this->beginWidget( 'COutputCache',array( 'id'=>$id, 'duration'=>$duration, 'dependency' => $dependency) ));
echo '</pre>';
Yii::app()->cache->delete(COutputCache::CACHE_KEY_PREFIX . $key);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question