Caching Problem with VPS Server using Prestashop

Avatar
  • Answered
I seem to be having a caching problem with smarty cache inside prestashop or a setting on the VPS server side. When making changes such as category add or delete or a CSS change the changes do not reflect until 24 to 36 hours. If I turn off smarty cache and set to force compilation the changes of course are immediate. But if I wait 10 minutes and turn smarty cache back on, as it should be, and take off the force compilation the changes are not saved. So I assume it is pulling old cached data. I talked to tech support and they said try the prestahop forums. I get several responses from developers that said they have never had this problem with prestashop. One developer suggested some sort of server settings. Please read his response below.

I have not had any of the issues that you have stated. I have worked on several hundred shops in my time developing with Prestashop. My best guess is that it is an issue with your server permissions though. Under some forms of php and specific conditions an application can create files, but not have the ability to delete or modify them. That could very well be the case on your site. The clear cache button might not be working because the permissions on your server are not set to standard settings.

Why don't you tell us more about your problem and we might be able to help more. Who is your host? Are they running a vps cloud? Is there an nginx frontend server? When you delete the cache files through Prestashop are they actually deleted?

Does anyone have any idea what is causing the updates to take so long to be saved?



Hosting complicates the issue. Every hosting company wants to do things differently, so it is hard to write software that works with every host with their odd settings.
Avatar
JacobIMH
Hello COMARKET, and thanks for your question. It sounds like you just need to open your site in a separate web-browser completely and you should see your changes reflected right away. You might also be able to just clear your web-browser's cache as well to see the changes. But this is client-side and not server-side caching that you're seeing it seems like. Have you made any manual adjustments to your PrestaShop installation? As this doesn't appear to be the default behavior that is used when caching is enabled. I did a clean install of PrestaShop in the same account on your VPS and it does not seem to have this same behavior. Because you also had a support ticket in to us about this issue I was able to log directly into your PrestaShop installation on your VPS and take a look at this issue for you. This is all that I did, and things appear to be working correctly at this time and I'm unable to reproduce these delays in updating content that you are referring to.
  1. Login to the PrestaShop dashboard
  2. Hover over Advanced Parameters then click on Performance
  3. Under the Smarty section, beside Template Cache left on Recompile templates if the files have been updated
  4. Beside Cache clicked on Clear Smarty cache & Autoload cache
  5. Hover over Catalog click on Categories
  6. Here I renamed the Test category to Testing, and added a new category called Test 2
  7. In Google Chrome I opened a new Incognito window (no history / cache) and pulled up your site and saw the changes right away.
Please let us know if you have any further questions at all. - Jacob