Jump to content

Cache not clearing


Pentarou

Recommended Posts

Hello,

We use Prestashop 1.7.6.2, changes made to CSS are not displayed to customers after clearing the cache and even manually clearing the cache in the var/cache folder.
When our customers clear their browser cache or press CTRL + F5, the changes are visible.

As you can imagine, customers will not understand this, we need customers to see changes immediately after clearing the cache.
How do I do this?

Please note that no server-side caches are enabled that cause this.

Link to comment
Share on other sites

Hi El Patron,

We use CCC and set the option to recompile templates if the files have been updated, but it doesn't seem to do that, neither does forcing compilation or deleting cache manually.

Our custom.css file is not loaded when I enable Smarty Cache for CSS, so that option is not even enabled, but if it is disabled, our custom.css file is loaded.

The debugging mode shows no errors and neither does our server log.

Link to comment
Share on other sites

I solved both problems.

The custom CSS was loaded, but got corrupted by a missing bracket in one of the style sheets of the custom module of the theme that we use. Strangely enough, this problem ensured that the style sheets at our customers were not refreshed after the cache was emptied.

Link to comment
Share on other sites

Pentarou, is your problem solved?
There's something I don't understand about the CTC.
For example, when I access my site, my browser loads the name of the compiled css file "...assets/cache/theme-8e09ea26.css". 

When I clear the cache, the file is then deleted from my server. But if I reload my page, the browser always loads the same file "...assets/cache/theme-8e09ea26.css" and it is on my server again.

As the file name is identical, my browser will not load it from my server but uses the cached file.

Link to comment
Share on other sites

Hi Mickael,

 

Yes the problem is solved.

Custom.css was loaded, but was cut due to a missing bracket in one of the CSS files of the module from my theme, which somehow also prevented the cache from being refreshed properly to our customers.

Try emptying prestashop/var/cache/* and the cache folder inside your theme's directory manually.

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...