Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    •  
      CommentAuthorfrancois
     
    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
    • CommentAuthordelia
     
    hi francois,
    did you solved this problem?
    I can't make the expirePage method to work......