Re: [SMARTY] Cache in mysql database. Possible?

From: Date: Thu, 09 Sep 2004 17:32:37 +0000
Subject: Re: [SMARTY] Cache in mysql database. Possible?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11795@lists.php.net to get a copy of this message
--- Ajay Sharma <ssharma@revsharecorp.com> wrote: > > What about storing the compiled templates in a database? It would be > kinda neat to just empty a table when upgrading smarty instead of > having to find all the 'template_c' folders and emptying them out. No, its not possible. Besides, why is emptying a table more 'neat' than emptying a directory? > I haven't given any thought to performance or anything like that. > I'm just wondering if it's possible. It would likely lead to poor performance. Same goes for cache files -- I suggest that you keep them on the filesystem if you want to maintain your performance levels. At the minimum, you need extra socket calls with every db access and that is far more expensive (on average) than a corresponding local filesystem call. Since files are typically compiled infrequently compared to views, storing templates and config files in a db doesn't have as many time critical issues. The same can not be said for the working-set files (compiled and cached). xo boots > --Ajay > > Monte Ohrt wrote: > > certainly possible. > http://smarty.php.net/manual/en/section.template.cache.handler.func.php > > > > Zoran Knezevic wrote: > > > >> Hi Smarty ppl! > >> > >> I have problem, I should have huge number of files that > >> are cached and I have idea to put cache in the > >> database. Is it possible? > >> > >> Best regards, > >> > >> Zoran

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