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

SmartyNocache:

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
samj
Smarty n00b


Joined: 10 May 2011
Posts: 1

PostPosted: Tue May 10, 2011 6:45 pm    Post subject: SmartyNocache: Reply with quote

Hi,

This is my first attempt to install Smarty on a vista xampp home dev.
The first page after installing contains an error:
The value of {$Name} is /*%%SmartyNocache:231654dc8e047902709-39153788%%*/getVariable('Name')->value;?>
/*/%%SmartyNocache:231654dc8e047902709-39153788%%*/

which disappears when setting $smarty->caching = false;

Significance, explanation, consequences of this change are appreciated

thanks, samj
Back to top
View user's profile Send private message
Kirill
Smarty Rookie


Joined: 10 Jan 2010
Posts: 8

PostPosted: Sat Nov 05, 2011 12:18 pm    Post subject: Reply with quote

I started having the same issue but I didn't even fiddle with smarty's settings

Edit: turns out this bug appears only when I have
$this->setCaching(3600);

but doesn't when I have

$this->setCaching(Smarty::CACHING_LIFETIME_SAVED);

but with the latter, it only retrieves one cache file for different pages
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Nov 05, 2011 12:47 pm    Post subject: Reply with quote

Valid values for setCaching() are only smarty::CACHING_OFF,
smarty::CACHING_LIFETIME_CURRENT and smarty::CACHING_LIFETIME_SAVED to define the caching mode.

The cache lifetime like 3600 sec must be set with setCacheLifetime().

If you want to cache different content from sample template you must use a unique cache_id when calling display().

See http://www.smarty.net/docs/en/caching.multiple.caches.tpl for the details.
Back to top
View user's profile Send private message
Kirill
Smarty Rookie


Joined: 10 Jan 2010
Posts: 8

PostPosted: Sat Nov 05, 2011 1:37 pm    Post subject: Reply with quote

oh! thanks!
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 -> Installation and Setup 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