Cache time problem

Hello Everyone . In our multivendor marketplace, we are currently a problem with a Cache ., when we modify the photos or the banner of the site, our customers cannot see the new images but continue to see the old ones. We would like to know how to fix this cache problem and reduce page cache time to allow our customers to see changes faster. Any help would be greatly appreciated. THANKS.

Customers need to clear their browser cache so not much you can do from your end.

Do these images (old and new) has the same name and located in the same directory?

but I think I should rather change the duration of the cache so that it does not exceed 24 hours, it is not professional to ask customers to empty their cache every time I change the banner or the image of the categories

they don’t have the same name! I think cs cart saves the cache to the client for a long period! How can I change the cache duration? can varnish solve my problem?

Remember that cache vastly speeds up your website loading time. So cache isn’t necessarily a bad thing.
Also, I think you can also delete the cache yourself by either using the option Administration → Store → Clear cache, or by deleting content of /var/cache directory of your store. This, however, will make site load slower for customers for some time.

Best regards,
Robert

1 Like

Default is 2 weeks. You can edit it in the main htaccess file.

# Cache all images for 2 weeks
<IfModule mod_expires.c>
	<FilesMatch "\.(jpg|jpeg|png|gif|tiff|bmp|js|css)$">
	    ExpiresActive on
	    ExpiresDefault "access plus 2 weeks"
	</FilesMatch>
</IfModule>
2 Likes

If you upload new images with another names, it looks like server cache issue, not CS-Cart

2 Likes

Thank you for your answer , but it’s very strange I delete the cache and in iPhone and android have a different images on the banner … ? I can’t find the issue

Thank you for you’re answer , I delete the cache from the serveur , but I steal have the problem ( iPhone have a new images banner but Samsung have a old image banner ) when I try the iPhone and Samsung was a first time connect in my site …

Hello
Did you try on incognito window?

Best regards
Robert

I don’t have this addon on my cs cart I have version 4.14.1 ! Did you recommend it to buy that addon ?

No, I did not mean an add-on.
If you’re using an internet browser, you have an option “Incognito mode” available. This option opens a special browser window which is treated as a completely new user - so it does not use cached data, and therefore can be used to check what do your customers see on the banner.

I don’t know what browser you’re using, but most of them have “Incognito mode” built in.

Best regards,
Robert

1 Like

Yes I try ! But I find the issue :sweat_smile: it was the language , I have English and French language !! I deactivate English language and android show the new banner…
Thank you for your help :)))

1 Like

Hello

You are welcome :slight_smile:

Best regards
Robert

1 Like