ajax in admin and on_after_save hook

Merry Christmas!
I have added:
function on_after_save($values){//clear menu cache...
parent::on_after_save($values);
$this->fuel->cache->clear_all();
}
to the navigation model in fuel to try and clear the cache after any create/edit event in the navigation occurs (because I am caching the block that contains my navigation menu). This works for editing/creating normally, but seems not to be triggered via ajax, e.g. when drag/dropping items when 'rearranging' their precedence in list view or toggling the boolean fields in list view.
Since my users love these ajax features, is there a way I can trigger these hooks after saving by ajax?

Many thanks

Guy

Comments

  • edited 10:13AM
    For the navigation module, it should be automatically clearing the page cache when creating/editing in the CMS. Were you needing the Dwoo compiled cache cleared in addition to the page cache for the navigation module? The Dwoo compiled cache holds the compiled dwoo templates that are used to generate the pages.

    With regards to the rearranging of items, I've pushed an update to clear the page cache after rearranging (calling the _clear_cache method on the fuel/modules/fuel/controllers/module.php controller).
Sign In or Register to comment.