Jump to content

How to clear PrestaShop 1.6 cache manually


Recommended Posts

Hi!

 

How to delete the cache files?

 

  1. Using FTP or your hosting file manager, browse the folder on your server where you have installed Prestashop:
    \cache\smarty\cache\
  2. You can see many files with long names in this folder. The file names include the module name, so you can delete any of them. Just leave the index.php file alone!

Good luck

 

 

MacRoy

  • Like 2
Link to comment
Share on other sites

HI!

 

 

If 1.6.0.8 works well for you so I would not recommend you to update yet. 
 
The reason is that there are a lot of bugs that need to be fixed first. For example, to create new CMS pages. 
 
Hopefully they will release a newer version soon!
 
 
MacRoy
  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hi!

 

How to delete the cache files?

 

  1. Using FTP or your hosting file manager, browse the folder on your server where you have installed Prestashop:

    \cache\smarty\cache\

  2. You can see many files with long names in this folder. The file names include the module name, so you can delete any of them. Just leave the index.php file alone!

Good luck

 

 

MacRoy

Hi MacRoy

How are you ? I hope you can advise me...  you seem to know a lot more than me :-) 

I would like to dispable best sellers on my ps 1.6 front page. I have disabled the module. The tab in cashing under 'advanced parameters , performance' is set to 'no'  so I cant clean the cache. 

the website is www.rosieposy.fr.

Thanks for your time and advice.

Kind regards

Len

Link to comment
Share on other sites

  • 2 months later...

I have problem with the cache, the changes I made in global.css are not showing under any circumstances and I've tried everything mentioned on the forum:
turned off cache in smarty, force compilation in smarty, turned off all other cache in CCC, turned off caching generally, manually deleted smarty cache and compile on server.

The changes I've made to the global.css are:
Line 5725:
body {
  background-color: black;  INSTEAD OF WHITE I'VE PUT BLACK
}

And whenever I load the global.css in firebug, the changes are not there.

I've also tried to add lines at the end of css and I don't see them in live site with firebug.

One thing I've noticed, even thought the caching is disabled, the smarty cache directory is filled up when I load the page. If the caching is turned off, shouldn't this directory be empty all the time?

Also, when I change tpl files, the changes appear instantly, I have problem only with css.

The url: http://logoffect.com/test2/index.php

ver:1.6.0.9

Thanks!

Link to comment
Share on other sites

That's especially weird. As any changes I make to my css appear instantly, regardless of whether the cache is on or off. This may sound like a silly question, but:

Inspecting the body element in Google Chrome, the url to the global.css is: http://logoffect.com/test2/themes/leo_tshirt/css/global.css. Ensure that this is the correct file. And also, if you're editing it on your computer, make sure you upload it onto your web server.

Link to comment
Share on other sites

Glad you got it sorted! I remember something similar when I first started using PS, and It turned out to be my browser using it's own cached version of the Css file. Pretty sure it was Internet explorer. I got around it by hitting F5 a few times so it could grab the latest version from the server. It may help you for the future if it happens again!

Link to comment
Share on other sites

Just want to give you an update. Very strange, but expected, looks like the delay was caused by cloudflare, I've been using it on this domain and as soon as I turned it off, the changes to css start to appear immediately. When the cloudflare was on, it was like an hour or so delay between updates, seems likely that they were caching the whole site, css and images, only php pages were not cached since the changes to tpl files appeared immediately.

 

Thanks!

Link to comment
Share on other sites

That was going to be my other guess! I think they only check periodically that the css and javascript files have changed on your server, hence the delay. It's probably best to keep everything server side while you're testing the site, as it could become incredibly frustrating!

 

Anyhow, glad you got it sorted!!

Edited by garyjj127 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I have had a similar problem.  Even though I have this completely turned off and have FTP deleted the cache and compile files, it is still a big problem.  When in the CMS, I have to CTRL+F5 just to see what settings I have changed.  On the front-end, when a customer logs out, it still shows them as logged in.  Also my changes do not appear on the front-end without lots of F5.  I also believe this is effecting the default-bootstrap cart preview drop-down as it will show "no products" even though products were added.  www.plaquesawards.com

 

Thanks in advance for the help.

Link to comment
Share on other sites

I remember having this problem due to a server setting in .htaccess. If I remember correctly, it was designed to speed up the response time of the server, and not update the cookie until x days had passed. It was a complete nightmare until I tracked it down. I'm pretty sure it looked something like this:

 

ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"

 

It basically speeds up the response by serving pages that haven't changed on the server until X amount of days / hours have passed.

 

Take a look to see if something like this appears in your htaccess file, or your server setting if you're not using apache.

Link to comment
Share on other sites

I remember having this problem due to a server setting in .htaccess. If I remember correctly, it was designed to speed up the response time of the server, and not update the cookie until x days had passed. It was a complete nightmare until I tracked it down. I'm pretty sure it looked something like this:

 

ExpiresActive On

ExpiresByType image/jpg "access plus 1 year"

ExpiresByType image/jpeg "access plus 1 year"

ExpiresByType image/gif "access plus 1 year"

ExpiresByType image/png "access plus 1 year"

ExpiresByType text/css "access plus 1 month"

ExpiresByType application/pdf "access plus 1 month"

ExpiresByType text/x-javascript "access plus 1 month"

ExpiresByType application/x-shockwave-flash "access plus 1 month"

ExpiresByType image/x-icon "access plus 1 year"

ExpiresDefault "access plus 2 days"

 

It basically speeds up the response by serving pages that haven't changed on the server until X amount of days / hours have passed.

 

Take a look to see if something like this appears in your htaccess file, or your server setting if you're not using apache.

 

Gary - yes, this does appear in my .htaccess file - are you saying that if I remove this the caching nightmare will end?

 

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>
Link to comment
Share on other sites

Hi

Sorry for the late reply, been off all weekend. It's certainly worth a try. Personally, I would make a copy of the htaccess file as it is now. Then remove the lines you have quoted above and retry. In particular it affects the css, and javascript, but in the long term it's worth keeping the lines relating to the fonts and the images, as it stops the browser asking the server for a new version of the file every time the site is visited.

 

The lines basically mean that the browser only needs to request new files from the server after 1 week, 1 month, or 1 year has passed. Otherwise, the browser will serve the page in the cache on your pc.

 

In most cases this is fine. However, it's not so good when you're testing the site as you can't instantly check changes you've made, and I'm pretty sure it will solve the problem about logging out.

Link to comment
Share on other sites

×
×
  • Create New...