Re: [SMARTY] cache dir size

From: Date: Wed, 03 Jul 2002 20:26:10 +0000
Subject: Re: [SMARTY] cache dir size
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5184@lists.php.net to get a copy of this message
Ticks are interesting, but I'm not sure they'd be useful for cache cleaning. Are ticks meant to work across invocations of a script? What I mean is, cache cleaning would be something that happens periodically, like every 100 invocations of Smarty. Cache cleaning would not be something that happens several times during the execution of one script, which it looks like that is what ticks are meant for. I could be wrong. Monte Gerard Samuel wrote:
Im not sure if this was discussed before. I haven't gotten to use caching as yet, but I was planning on exploring the possiblities of using these functions when I do start using cache with smarty. register_tick_function() -> http://www.php.net/manual/en/function.register-tick-function.php unregister_tick_function() -> http://www.php.net/manual/en/function.unregister-tick-function.php According to the docs, its good for background processing, but again, I haven't tried this as yet. Just want to bring this to light to the smarty developers just in case that this can be an option in file maintainance.... Monte Ohrt wrote:
On another note, as of the latest CVS version, Smarty now keeps cache files all in one directory, except with the use of cache_id and compile_id. Those are all put under their respective subdirectories. As far as having 50,000 files in one directory, Smarty doesn't care but your operation system might not manage that too well. I've had 30,000 files under one directory under Solaris and it was still quick (except when trying to _view_ this directory, the terminal choked.) This is the original reason why all templates were hashed and placed into sub directories. It made the files an unrecognizable mess, but it made sure the cache files were split up into subdirectories fairly evenly. Thoughts about this? Monte eNotalone.com inc. wrote:
Hi everyone! What happenes when you use smarty with large amount of pages? i have about 2500 articles for now and when i cache them the cache directory size is already too large, what will happen if i have 50.000 articles? will smarty continue to keep all the cached file in a single directory or does it have the inteligence to manage such issues? of couse i could use childish solutions like having a separate class for every lets say 1000 article! then smarty will have separate directories for every 1000 article cache. before doing this i would like to check what others think about this problem. _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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