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

compilation and plugin apc smarty 3

 
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 -> General
View previous topic :: View next topic  
Author Message
gtraxx
Smarty Regular


Joined: 08 Jan 2008
Posts: 56

PostPosted: Wed Feb 13, 2013 8:09 am    Post subject: compilation and plugin apc smarty 3 Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Feb 13, 2013 7:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
gtraxx
Smarty Regular


Joined: 08 Jan 2008
Posts: 56

PostPosted: Thu Feb 14, 2013 7:42 am    Post subject: Reply with quote

Thank you for your reply, I understand better how APC works
I'll also try memcached Smile
_________________
* Creator of Magix CMS
* Creator of Magix cjQuery
* Co-maintainer jQuery UI Bootstrap
Back to top
View user's profile Send private message
adrik
Smarty n00b


Joined: 04 May 2013
Posts: 1

PostPosted: Sat May 04, 2013 6:23 am    Post subject: Reply with quote

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
View user's profile Send private message
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 -> General 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