• Docs >
  • 3. How to clean the caches at your ShimmerCat Edges

3. How to clean the caches at your ShimmerCat Edges

ShimmerCat caches static assets at the edges using two different caching classes. Depending on configuration, they are either cached as normal files (NF) or as generated assets (GA).

For assets cached as normal files, the best way to notify the edges of new versions of the files is through the so called “changelists”. For generated assets, the most straightforward way to notify the edges of new content versions is by using new query strings. Each of these mechanisms works only in its caching class: changelists for normal files, new query strings for generated assets.

But there is a third mechanism which works for both, namely, using our API to evict entries from the edge caches. This document explains how to use that mechanism.

3.1. Clean cache with the API

Executing the command below results in an HTTP request to our API server. The request triggers a remote task for cleaning cache entries in all the edges that serve the domain.

curl \
     -X POST \
  cache/www.example.com/ \
     -H 'Content-type: application/json' \
     -d '{"resource_path_list": ["/js/general.js?181122", "/images/logo.png"]}'

3.1.1. Fields to replace

  • www.example.com Write here which domain you want to clear the cache
    from. This must be one of the domains in your ShimmerCat Accelerator account.

  • TTTT.... Write here you API token, which you should have
    received when subscribing to our service or via support channels.

  • ["/js/general.js?181122", "/images/logo.png"] Write here the resources for the cache entries you want to
    delete. It is a list of the resources you want to delete the cache for.

3.1.2. Reporting issues

If you have any questions or feedback, don’t hesitate to contact us at ops@shimmercat.com or through our ticket system.