Greetings!
There's a small bug with caching in smarty.
If you do the following:
1. Checks the cache with $smarty->is_cached($template)
2. You find out that the cache should be cleared because the timestamp of the
cachefile is older than some recently changed data.
3 Clears cache with $smarty->clear_cache($template);
4. Assign the new data and regenerate cache with
$smarty->display($template).
5. Smarty shows the old, cached template instead. <--- BUG
Right now smarty temporarily stores cache-content in a static variable
inside smarty_core_read_cache_file() and it is not cleared when you call
$smarty->clear_cache.
I've attached a patch which transforms the static variable in
smarty_core_read_cache_file() to a memberfunction of the Smarty-class
instead. This way clear_cache can correctly reset the state of the
cache-content.
/Nichlas
Smarty.class.php.patch
Description: Text document
core.read_cache_file.php.patch
Description: Text document
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|