|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
samj Smarty n00b
Joined: 10 May 2011 Posts: 1
|
Posted: Tue May 10, 2011 6:45 pm Post subject: SmartyNocache: |
|
|
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 |
|
Kirill Smarty Rookie
Joined: 10 Jan 2010 Posts: 8
|
Posted: Sat Nov 05, 2011 12:18 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Nov 05, 2011 12:47 pm Post subject: |
|
|
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 |
|
Kirill Smarty Rookie
Joined: 10 Jan 2010 Posts: 8
|
Posted: Sat Nov 05, 2011 1:37 pm Post subject: |
|
|
oh! thanks! |
|
Back to top |
|
|
|
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
|