Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit
https://github.com/akelos/akelos/issues
Akelos PHP Framework Forum
Discussions
Categories
General
: Sweeper and Module
Bottom of Page
1 to 2 of 2
CommentAuthor
francois
Hi,
Does sweeper run with modules ? I tried to implement a sweeper that catch an action within my controller but my sweeper action is never executed.
here my code. The action catched is 'add_comment'.
Controller
class Mymodule_BookController extends GeneralBookController
{
var $models = array('book','author');
var $caches_page = array('show');
var $cache_sweeper = array('book_sweeper' => array('only' => array('add_comment')));
function show()
{
$this->book->author->load();
}
}
Sweeper
class BookSweeper extends AkCacheSweeper
{
var $observe = array('Book);
function afterSave(&$record)
{
// Expire book page cache
$this->expirePage(array('module'=>'mymodule','controller'=>'cache_sweeper','action'=>'show','id'=>$record->getId()));
}
}
Thanks
Francois
CommentAuthor
delia
hi francois,
did you solved this problem?
I can't make the expirePage method to work......
1 to 2 of 2
Back to Discussions
Top of Page