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

Cache Problem

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
Hinrich
Smarty Rookie


Joined: 18 Apr 2003
Posts: 33

PostPosted: Sun Apr 25, 2004 2:09 pm    Post subject: Cache Problem Reply with quote

I have a little Problem with the cache. This is the message:
Quote:
Fatal error: Call to undefined function: _smarty_tplfunc_57e805213baa7e7fc03fd34574584c8a_0() in /usr/local/httpd/htdocs/tis/htdocs/includes/smarty/Smarty.class.php on line 1826

Smarty-Version: Current CVS

Any hints for an origin of search?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sun Apr 25, 2004 2:41 pm    Post subject: Reply with quote

this is a call to a plugin that was registered non-cacheable. but it seems the compiled include is not loaded properly.

my wild guess: clear cache and templates_c and see if the problem comes back
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hinrich
Smarty Rookie


Joined: 18 Apr 2003
Posts: 33

PostPosted: Sun Apr 25, 2004 5:52 pm    Post subject: Reply with quote

messju wrote:
this is a call to a plugin that was registered non-cacheable. but it seems the compiled include is not loaded properly.

my wild guess: clear cache and templates_c and see if the problem comes back


Yes, indeed, I have declared a block for disable caching as described on the resources here:

[php:1:e8fd1001bd]$this->register_block('nocache', 'vkpTemplateBlockNoCache', false);[/php:1:e8fd1001bd]

$this is a singleton instance of a class which has Smarty as parent class. This instance is called very often. Values are assigned, displayed or fetched (mainly displayed, because the complete output is catched) and values are removed again. I'm using my own resource reader because the templates are located in multiple directories.

vkpTemplateBlockNoCache is a simple return of the content passed as argument.

The problem won't be solved by removing all cached and compiled files. Those files are allways removed if the settings on the cache system or any other core settings are changed. I wrote a simple method on this:
[php:1:e8fd1001bd] /**
* ClearAll
*
* Löscht alle temporären Daten der Template Engine.
*
* @version 0.1
* @since 5.5.2
* @author Hinrich Donner <hd at phportals dot de>
* @see Smarty::clear_all_cache(), Smarty::clear_compiled_tpl()
*/

function ClearAll()
{
$this->clear_compiled_tpl();
$this->clear_all_cache();
}[/php:1:e8fd1001bd]
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Apr 28, 2004 2:10 pm    Post subject: Reply with quote

hmm, do you have force_compile enabled?

maybe there is a bug in smarty, that does include_once() on the function-definitions. when the id in the function-name changes (maybe by force_compile) that could trigger something you describe.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hinrich
Smarty Rookie


Joined: 18 Apr 2003
Posts: 33

PostPosted: Wed Apr 28, 2004 6:14 pm    Post subject: Reply with quote

messju wrote:
hmm, do you have force_compile enabled?


No, but I do have compile_check enabled and set up a compile id (depends on the selected language, choosen skin and the current user id).

Quote:
maybe there is a bug in smarty, that does include_once() on the function-definitions. when the id in the function-name changes (maybe by force_compile) that could trigger something you describe.


During my tests (switching on the cache from my interface) the compile id is not changed. But all files are deleted on the change. By doing this I delete the compiled templates first to make sure that a new cache file is not be written after deleting the cache but still having the compiled files (a .2 secounds period).
Back to top
View user's profile Send private message
Hinrich
Smarty Rookie


Joined: 18 Apr 2003
Posts: 33

PostPosted: Tue May 04, 2004 6:39 pm    Post subject: Reply with quote

So, no idea?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue May 04, 2004 9:02 pm    Post subject: Reply with quote

sorry, no idea.

i'd need a simple example that triggers the error above.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dthought
Smarty Regular


Joined: 21 Apr 2003
Posts: 55
Location: Melbourne, Australia

PostPosted: Fri May 14, 2004 4:46 am    Post subject: Re: Cache Problem Reply with quote

Hinrich wrote:

Smarty-Version: Current CVS


Try using the production instead of CVS version, see if it helps...
Back to top
View user's profile Send private message Visit poster's website
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 -> Bugs 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