Alex_Muir
(Alex Muir)
July 2, 2010, 12:34am
1
I have a site where I’ve got page caching set up and working perfectly. Here’s an example : http://www.thebigeat.com/takeaway/paradise_take_away
When a person adds a new review, I’d like to delete the cached version of the view takeaway page (otherwise their review won’t show up for 12 hours). Any ideas?
class Review extends CActiveRecord
{
...
protected function beforeSave($checkAccess = true)
{
if ($this->isNewRecord) {
// Delete cache
}
return parent::beforeSave();
}
}
Alex_Muir
(Alex Muir)
July 2, 2010, 10:15am
3
That’s great, but it’s the actual code to delete the cache of the view page that I can’t figure out.