Reply to RE: [SMARTY] caching files and sessions

Your name:

Reply:


Posted by Ashley Etchell :: Mtracking on 04/16/05 16:24

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация