Fork me on GitHub

Delete compiled templates on upgrade?  Bottom

  • I'm thinking trying to automatically delete compiled templates in a module upgrade. GetInstance and instance->clear_all_cache. Would this be considered bad practice?
  • In TimeIt I use the API of the pnRender Module:

    Code

    // clear compiled and cached templates
    pnModAPIFunc('pnRender', 'user', 'clear_compiled');
    pnModAPIFunc('pnRender', 'user', 'clear_cache', array('module'=>'TimeIt'));
  • planetenkiller

    In TimeIt I use the API of the pnRender Module:

    Code

    // clear compiled and cached templates
    pnModAPIFunc('pnRender', 'user', 'clear_compiled');
    pnModAPIFunc('pnRender', 'user', 'clear_cache', array('module'=>'TimeIt'));


    Thanks. Do you use it during a version upgrade?
  • Quote

    Do you use it during a version upgrade?

    Yes, I do. I've placed these 2 lines at the end of the upgrade function (before the "return true;").
  • Great! Than I guess I can safely regard this as good practive icon_wink .

    Thanks again

This list is based on users active over the last 60 minutes.