Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [SMARTY] caching files and sessions
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_p
ageoverview_departments in:

 s1_l10_g1_cGlobalOverview_y200503_cid9_p
ageoverview_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

Report this thread to moderator Post Follow-up to this message
Old Post
Ashley Etchell :: Mtracking
04-16-05 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:17 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.