Cache purging

You will often need to purge the cache from WebSonic.io.

Here are the steps to purge the cache using dashboard:

  1. Go to the cache purge tab.

  2. Click on New Request button.

  3. Select the environment (Staging or Production) from where you want to purge the cache.

  4. Enter the URL. You can add multiple URLs separated by a new line. You will need to enter the full URL including protocol (http/https) and all query parameters. For example - https://www.example.com/news/story-latest.html?lang=IN

  5. Click Submit.

Version control your static assets Purging is only recommended when absolutely necessary. It is best to give the resource a new path by renaming or adding a query parameter. This is even more important when updating the static content like JS, CSS, or images.

Wildcard support in URL

If you want to invalidate multiple objects such as all of the files in a directory or all files that begin with the same characters, you can include the * wildcard at the end of the invalidation path. For example https://www.example.com/directory/* , https://www.example.com/directory/initial-characters-in-file-name*.

Limitations

These are following limitation around purging:

  1. In case of wildcard URLs, * should only be present once, and that too, at the end of the URL. For example - https://www.example.com/directory/initial-characters-in-file-name*.

  2. The maximum length of a path can be 4,000 characters.

  3. Maximum 999 single URL requests and 4 wildcard URL requests can be in-progress state at any time. If you need to submit more, then wait for the existing in-progress requests to be finished.