RE: [SMARTY] cache dir size

From: Date: Thu, 04 Jul 2002 13:21:02 +0000
Subject: RE: [SMARTY] cache dir size
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5195@lists.php.net to get a copy of this message
[Whoops, I originally sent this to just Gerard by mistake...] I think that ticks work only within the processing of a single script. They wouldn't work between invocations of a script. The reason is that they require any code that uses them to be inside a declare() block: as soon as script execution moves outside the block (including the end of the script), ticks end. So, we're back to the "how to manipulate processes and maintain cross-platform compatibility" problem. I still think a garbage collection probability solution would work well in the execute-cleanup-every-X-invocations scenario. But then some unlucky user gets hit with the performance degredation every X or so invocations...and the conversation goes round and round. Manual cleanup vs. automated out-of- process cleanup vs. automated in-process (but hassle-free) cleanup... Gerard: check out the list archives, there was a pretty interesting thread on this a while back. Maybe you can come up with a new perspective. Hmm...not sure if it was the general or the development list, come to think of it. Gary > -----Original Message----- > From: Gerard Samuel [mailto:gsam@trini0.org] > Sent: Wednesday, July 03, 2002 6:33 PM > To: Monte Ohrt > Cc: smarty-general@lists.php.net > Subject: Re: [SMARTY] cache dir size > > > Well if I understood the man page on the tick functions, yes > it works by > counting invocations of script or function executions. > Unfortunately, I haven't gotten as far to use smarty's > caching routines, > so I don't know of its file naming convention and/or storage > requirements. > Ill try and get that smarty demo page to cache later this > week, and let > some thoughts swim around the brain a bit, and play with ticks, > and see if I can put together a proposal. > > Monte Ohrt wrote: > > > 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.... > >>

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