All Collections
Front-Commerce Cloud
Front-Commerce cloud Caching
Front-Commerce cloud Caching
Guillaume ARINO avatar
Written by Guillaume ARINO
Updated over a week ago

Front-Commerce cloud is using two type of cache to serve your content faster :

  • HTTP Cache

  • Data cache

HTTP Cache

At Front-Commerce, we know how important it is to serve your web assets, such as HTML pages, images, fonts, and CSS, as quickly as possible. That's why we've enabled HTTP caching, which allows them to cache their assets on a server side. With HTTP Cache, you can significantly improve the performance of your website and enhance user experience.

How to check your content cache status through your browser

You can check the HTTP cache status of a file by opening the DevTools of your browser and check the response header of an element.

The Cache-Control header tell you the applied rule to cache your content

The X-Cache header tell you if the cache is active (HIT) or is missing (MISS)

The X-Cache-Hit header allow you to know how many time this file was served through cache

<a href="https://downloads.intercomcdn.com/i/o/930527075/a690e1948a6148a2c2516c0a/image.png" target="_blank" rel="nofollow noopener noreferrer">https://downloads.intercomcdn.com/i/o/930527075/a690e1948a6148a2c2516c0a/image.png</a>

Clear the HTTP cache

You can clear your cache using the Front-Commerce Cockpit.

To clear your cache and see your changes right away, follow these simple steps:

  1. Go to your cockpit project page

  2. Once you're there, click on the "cache management" tab. This tab contains all the settings related to your website's cache.

  3. You'll now see three options to choose from: "clear file cache," "clear folder cache," and "clear whole cache". ◦ Clear file cache: This option will only clear the cached versions of individual files that make up your website. This includes images, stylesheets, and other media. ◦ Clear directory cache: This option will clear all files in a specific folder ◦ Clear whole cache: If you want to completely wipe out HTTP cache, this is the option for you. Please note that this may result in longer loading times for users until the new resource has been called and cache will be up again, but will guarantee that you will see the most up-to-date version of your website.

<a href="https://downloads.intercomcdn.com/i/o/930548696/648e890e433e0b84b1803d73/image.png" target="_blank" rel="nofollow noopener noreferrer">https://downloads.intercomcdn.com/i/o/930548696/648e890e433e0b84b1803d73/image.png</a>

Data cache

Data cache is used to store data that has been fetched from your website's backend, in order to speed up the delivery of this data to the user elsewhere. This means that when a user is visiting your website or app, they get to receive data from the cache, rather than retrieving it from the database at the backend.

Clear the data cache

The good news is that the data cache is automatically cleared when you make changes to a product in your backend. This means that your server will immediately recognize the changes and update the information displayed on your frontend. However, you have the ability to manually trigger a cache clear by using your front-commerce cockpit interface.

Log into your Cockpit, click on the Cache Management tab. Here, you will see the curl commands you can use to manage your cache. You can use the copy icon to copy command to your clipboard.

These commands are examples on how to call a data cache clear request, they must be edited to fit to your needs

<a href="https://downloads.intercomcdn.com/i/o/930555369/566822e1989ca67a36696299/image.png" target="_blank" rel="nofollow noopener noreferrer">https://downloads.intercomcdn.com/i/o/930555369/566822e1989ca67a36696299/image.png</a>
Did this answer your question?