Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

is_cached without template

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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: 7368
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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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