![]() |
Template Cache Not Updating
Any changes I make to the templates are not reflected in the website until I empty the templates_c folder.
I've just moved my X-Cart to a new host. On my old host, I could save changes to a template, refresh in my browser and have the changes instantly visible. Now, on my new host, I need to empty the templates_c folder, hence forcing the templates to re-cache, before I can see the changes. Permissions are 777 on all of /var. What could be causing this? I couldn't find any similar problem when searching the forum. Many thanks. |
Re: Template Cache Not Updating
Actually this is normal behavior. You can clear the cache by entering cleanup.php in your web browser at the directory where your xcart resides on your server.
|
Re: Template Cache Not Updating
Oh! So every time I make a change to a template file, no matter how small, I should be running cleanup.php?? That seems rather fussy... Perhaps my old server just wasn't set up correctly?
Thanks for your help. |
Re: Template Cache Not Updating
Smarty provides a method to increase speed by caching the templates so they do not need to be recompiled. This should NOT be used when you are making changes to your site templates, as no template changes will be recognized while the check is disabled. So if making changes, you will need to ensure this variable is set to "true."
You can enable template caching by opening the file "Smarty.class.php" in your smarty directory and editing this variable to "false": /** * This tells Smarty whether to check for recompiling or not. Recompiling * does not need to happen unless a template or config file is changed. * Typically you enable this during development, and disable for * production. * * @var boolean */ var $compile_check = true; /** * This forces templates to compile every time. Useful for development * or debugging. * * @var boolean */ var $force_compile = true; |
Re: Template Cache Not Updating
Perfect! Thanks for that. Still not sure what was happening on my old server but at least things are working properly now.
Cheers, |
Re: Template Cache Not Updating
Got the same problem... but where is "Smarty.class.php" .. and where is the smarty directory
|
Re: Template Cache Not Updating
Welcome to the X-Cart forums originalwest ! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:
http://forum.x-cart.com/showthread.php?t=23970 Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your questions correctly. Thanks! :) |
Re: Template Cache Not Updating
originalwest,
Your Smarty directory is xcartdir/Smarty-2.6.19/. Your version number may differ and 'xcartdir' is the directory with all your x-cart files. You'll find Smarty.class.php in this folder. Cheers, |
Re: Template Cache Not Updating
mmm... OK
Doesn't look like the Smarty-2.6.19 folder came with the download (4.20) as with earlier versions. Guess we need that first. |
Re: Template Cache Not Updating
In 4.2 - the smarty directory is here: /include/lib/smarty
|
All times are GMT -8. The time now is 12:01 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.