View previous topic :: View next topic |
Author |
Message |
t3hAndy Smarty Rookie
Joined: 10 Sep 2008 Posts: 12
|
Posted: Thu Nov 26, 2009 3:43 pm Post subject: cache_handler_func |
|
|
Hi,
I am missing the cache_handler_func
How could I find this functionality on smarty 3.0? _________________ I developed a Webradio |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Nov 27, 2009 12:02 am Post subject: |
|
|
A couple of Smarty3 caching features could not work with Smarty2's implementation of the cache_handler_func. Smarty3 does use resources for cache handling. Currently the default file cache resource is implemented. (smarty_cacheresource_file.php)
I will provide during the next couple of days an example for the implementation of other resources. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Nov 27, 2009 8:51 pm Post subject: |
|
|
I have added a cache resource plugin for MYSQL to the SVN.
The file name is cacheresource.myql.php.
It can be enabled with:
$smarty->caching_type = 'mysql';
This could be taken as example how to write custom cache resources. |
|
Back to top |
|
t3hAndy Smarty Rookie
Joined: 10 Sep 2008 Posts: 12
|
Posted: Wed Jan 06, 2010 1:53 pm Post subject: |
|
|
Where could I download this file? _________________ I developed a Webradio |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
Back to top |
|
ezmil Smarty Rookie
Joined: 06 Feb 2010 Posts: 6
|
Posted: Sat Feb 06, 2010 3:37 pm Post subject: |
|
|
I tried to save the wiki code as 'smarty_internal_cacheresource_mysql.php' in sysplugins directory, didn't work.
Can you tell where to put the wiki code and which name to use to save the file?
Do I need to do anything else? Some 'register' stuff maybe?
Thx, a lot |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Feb 06, 2010 4:27 pm Post subject: |
|
|
The code must be stored as cacheresource.mysql.php in the plugins folder. |
|
Back to top |
|
ezmil Smarty Rookie
Joined: 06 Feb 2010 Posts: 6
|
Posted: Sat Feb 06, 2010 6:29 pm Post subject: |
|
|
thx,
works so far ... but a method is missing (102):
Code: |
if (!$template->isEvaluated()) { ... }
|
isEvaluated - renamed or gone forever? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Feb 06, 2010 6:39 pm Post subject: |
|
|
Due to some recent change it must be:
Code: | if (!$template->resource_object->isEvaluated) { ... } |
|
|
Back to top |
|
|