Forum Moderators: coopster

Message Too Old, No Replies

Smarty caching logic

         

trevordixon

5:27 pm on Aug 8, 2007 (gmt 0)

10+ Year Member



How long does a $smarty->clear_cache(..., ...) function take? More specifically, how long would it take to run 300 or more of them?

I'm implementing Smarty's caching in my application, and when a user lists himself in three hundred cities, I need to clear the cache for those 300 city pages. So should I run a loop that clears the cache for all those city pages, or should I let the cached pages expire every five or ten minutes? Or is there some way I can take advantage of cache groups (the a¦b¦c thing as described in the manual)? Maybe there's some way I can pass an array of $compile_id's to clear_cache()...

Thanks for your advice, I hope somebody can answer this Smarty specific question.

eelixduppy

9:12 am on Aug 14, 2007 (gmt 0)



>> how long does it take?

Run a few experiments to find out how fast it runs on your machine. microtime [php.net] is generally used for such a thing.

Try a few methods out and see which works best for you.