smarty recompiling with op-code accelerators
Monte Ohrt <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
Just a quick note on clearing files from the templates_c directory (as pointed out by one of our clients): On occasion one may have the need to clear the files out from the templates_c directory and let Smarty recompile them, such as the case when upgrading Smarty or making other major changes. Many times you will get garbage HTML pages rendered after clearing, and this is remedied only by clearing the op-code files created from the op-code accelerator and restarting the web server (to clear op-code memory files too.) The reason is this: When Smarty recompiles the files in templates_c, they retain the mtime of the originating template files, which is typically the exact same mtime they had before being cleared. Then the op-code accelerator sees the same timestamp as before and does not refresh the op-code files. This would be remedied if Smarty's compiled files did not retain the mtime of the originating template file, but that introduces a problem when someone dumps templates onto a production server (from an RPM or tarball) which wouldn't necessarily have a newer timestamp, ending up with spurratic recompile results. Any thoughts on handling any of this a bit more gracefully? ;) Maybe some more documentation details are in order as well. Monte -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php