Proposal for inclusion of a compile_id (including attachement)
| From: | Hans-Peter Oeri | Date: | Fri, 27 Jul 2001 19:02:42 +0000 |
| Subject: | Proposal for inclusion of a compile_id (including attachement) | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1288@lists.php.net to get a copy of this message | ||
Hi II!
Sorry, forgot the attachement... I'll have to get some sleep.
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...).
---
You are currently subscribed to smarty as: lists+smarty@oeri.ch
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
Attachment: [application/x-bzip2] smarty-1.4.4-compile_id.patch.bz2
Attachment: [application/x-bzip2] smarty-1.4.4-compile_id.patch.bz2