RE: [SMARTY] cache dir size
| From: | Raphael Balimann | Date: | Thu, 04 Jul 2002 08:10:16 +0000 |
| Subject: | RE: [SMARTY] cache dir size | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5193@lists.php.net to get a copy of this message | ||
Hello,
a tick is a event wich occurs every X "low-level-statement" executed by the
parser within a given declare block. mainly purpose: debugging. (you don't
have to put your echo's everywhere you want to know it, simply put the code
in a block like below, define a function a wich echoes your var's, register
the function and it works.
function a () {
echo "$b, ". microtime();
}
register_tick_function("a");
declare (ticks=1) {
statements() {
control_structure();
}
} /* <-- ticks has been shuted down now! */
hth,
Raphael.
> > 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
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >
> >
> >
>
> --
> Gerard Samuel
> http://www.trini0.org:81/
> http://dev.trini0.org:81/
>
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>