Proposal for inclusion of a compile_id

From: Date: Fri, 27 Jul 2001 18:59:56 +0000
Subject: Proposal for inclusion of a compile_id
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1287@lists.php.net to get a copy of this message
Hi! Find included a proposal for inclusion of a compile_id à la cache_id. It's a patch against Smarty 1.4.4 release. It's only a first version, but works fine in my preliminary tests. No warranty. Please let me know what you think of such changes... Don't conform! IkKampfCaspar75 SUMMARY: -------- name creation for cache/compiled files -------------------------------------- I combined the name creation process in the methods _get_auto_base/_get_auto_filename. Both, cache and compiled files, follow therefore the same scheme: a) a "base directory" per template file b) a concrete file in that directory per cache_id/compile_id It's now an md5 algorithm. For debugging purposes one could simply change these two methods from md5 to something else and get human readable directories! The directory "clearing" methods are combined as well: _rm_auto WARNING: As the directory structure in the cache_dir/compile_dir is NOT fixed, I included a generic rmdir method. It may do whatever damage data deletion can do! Don't use it at best! inclusion of a compile_id ------------------------- Besides a cache_id, you can give a compile_id as next parameter to display/fetch. It should work quite the same way as the cache_id: one compiled template file per compile_id. If you use caching AND compile_ids, the "real" cache_id is the both ids combined! (as we must have one cache per compiled file...).

« previous php.smarty.general (#1287) next »