Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

is_cached without template

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
stepvut
Smarty n00b


Joined: 20 Oct 2008
Posts: 3

PostPosted: Mon Dec 14, 2009 7:46 pm    Post subject: is_cached without template Reply with quote

Hello


1. My pages are based on the template name which is taken from the database
2. Main purpose of caching - to prevent unnecessary requests to the database

Trouble: to use $smarty->is_cached() i need to know the template name


Is there any way to solve this problem using Smarty3? for example, using unique identifiers
Back to top
View user's profile Send private message
stepvut
Smarty n00b


Joined: 20 Oct 2008
Posts: 3

PostPosted: Fri Dec 25, 2009 7:52 pm    Post subject: Reply with quote

or write my own cache plugin?

... someone? anyone? )
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Fri Dec 25, 2009 9:21 pm    Post subject: Reply with quote

You can use a unique cache_id for each request?
Back to top
View user's profile Send private message Visit poster's website
stepvut
Smarty n00b


Joined: 20 Oct 2008
Posts: 3

PostPosted: Fri Dec 25, 2009 10:39 pm    Post subject: Reply with quote

sure, something like md5(serialize($_GET))
Back to top
View user's profile Send private message
idac
Smarty n00b


Joined: 01 Dec 2011
Posts: 1

PostPosted: Thu Dec 01, 2011 9:08 pm    Post subject: Reply with quote

stepvut wrote:
sure, something like md5(serialize($_GET))

How have you solve this?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP