|
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 |
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Wed Feb 13, 2013 8:09 am Post subject: compilation and plugin apc smarty 3 |
|
|
Hi,
I add the plugin Smarty_CacheResource_Apc.
I configured like this:
Code: | $smarty->compile_check = true;
$smarty->setCaching(true);
$smarty->setCachingType('apc');
|
when I enable the cache,
the compilation is empty but if I disable, I have files.
is this normal ?
The cache folder it is used with the APC plugin ?
Best regards |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Feb 13, 2013 7:59 pm Post subject: |
|
|
If you the APC cache resource the cache_dir folder of the file system is not used. The cache files are stored only in the memory area of APC.
NOTE: Even if you have APC installed but don't use it as cache resource you may see still speed improvements on compiled and cached Smarty templates because they are PHP files. |
|
Back to top |
|
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Thu Feb 14, 2013 7:42 am Post subject: |
|
|
Thank you for your reply, I understand better how APC works
I'll also try memcached _________________ * Creator of Magix CMS
* Creator of Magix cjQuery
* Co-maintainer jQuery UI Bootstrap |
|
Back to top |
|
adrik Smarty n00b
Joined: 04 May 2013 Posts: 1
|
Posted: Sat May 04, 2013 6:23 am Post subject: |
|
|
I did find this in the list of bugs for APC: http://pecl.php.net/bugs/bug.php?id=16736
But the long and short of it, it doesn't look like they are going to
change the way APC works.
"Sounds like with the inodes changing on every file update the cache
doesn't find the original entries in the cache (as they are key'd off
of
the inode #) and remove them on the new insert, so entries just stack
up.
Do you have a ttl set for your file cache? If not does setting one to
a
very low setting help? (entries will be removed if we come across them
or on a cache full scenario, rather than expunging the entire cache).
Another option here would be to upgrade to 3.1.1 or above, and use the
apc_delete_file($filename) before you delete the original file on
disk. |
|
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
|