RE: [SMARTY] caching files and sessions

From: Date: Sat, 16 Apr 2005 13:24:26 +0000
Subject: RE: [SMARTY] caching files and sessions
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12525@lists.php.net to get a copy of this message
My code works by checking if the cached template exists using: if( (!$Nav->tpl->is_cached('content.html',cache_name()))) { if($_PCONFIG['query_f'] != '') { // function to return database query results $data = $_PCONFIG['query_f'](); } cache_name() returns the name of the cached file, eg s1_l10_g1_cGlobalOverview_y200503_cid9_pageoverview_departments in: s1_l10_g1_cGlobalOverview_y200503_cid9_pageoverview_departments^%%11^11A^11A 9DC5F%%content.html The cache doesn't seem to be respecting the cache life_time value of -1 So no db query is performed if the template exists (in theory!) but this does not seem to be happening I am using version 2.6.5-dev Cheers Ash ________________________________________ From: Vicente Werner [mailto:vwerner@gmail.com] Sent: 16 April 2005 09:29 To: ash@mtracking.com Subject: Re: [SMARTY] caching files and sessions I think you're doing this at the wrong level, what you must cache is your data not the compiled templates, there're a number of php apis that have data caching abilities. Btw the problem is not ^%%11^11A^11A9DC5F%% as it's the id it adds to the file, also you haven't told us which smarty version are you using

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