Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
memcache with caching and compiling

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
baskettcase
Smarty Rookie


Joined: 19 Jan 2011
Posts: 15

PostPosted: Fri Feb 08, 2013 6:44 am    Post subject: memcache with caching and compiling Reply with quote

I am using Rodney's memcache class for caching, thank you Rodney Smile Is there a way that I can store it in my own plugin directory? It seems to have to be in the regular plugin directory.

Also can you, or is it advisable, to also use memcache for the compiled template when there are multiple server instances? We are trying to move as much as we can out of the filesystem since we're moving to the cloud. Or is it even necessary?

Thanks!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7255
Location: Lincoln Nebraska, USA

PostPosted: Fri Feb 08, 2013 2:07 pm    Post subject: Reply with quote

The plugins dir can be an array of directories, so yes you can use your own.

I would recommend to use the file system for compiled files. They are PHP, so they will take advantage of op-code caches such as APC.
Back to top
View user's profile Send private message Visit poster's website
baskettcase
Smarty Rookie


Joined: 19 Jan 2011
Posts: 15

PostPosted: Fri Feb 08, 2013 8:47 pm    Post subject: Reply with quote

mohrt wrote:
The plugins dir can be an array of directories, so yes you can use your own.


It wasn't working with 3.1.9, but I upgraded to 3.1.13 and it seems to be working now. The rest of my plugins worked it was just the cacheresource one that didn't work in my custom directory.

mohrt wrote:
I would recommend to use the file system for compiled files. They are PHP, so they will take advantage of op-code caches such as APC.


If we are in the middle of a promotion and I need to do a tweak, fixes, etc to the code/templates, etc wouldn't this mean that I would need to push the changed files to the rest of the servers then?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7255
Location: Lincoln Nebraska, USA

PostPosted: Fri Feb 08, 2013 8:54 pm    Post subject: Reply with quote

It depends on how your servers are setup. Do they share template source files but maintain their own compiled files? If that is the case, the servers should recompile the changed templates if compile check is enabled.

If you are adjusting PHP code such as plugins, you might want to wipe out compiled and cached files if your changes affect how things get compiled/cached. Changing PHP Code will not trigger a recompile or cache regenerate.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 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