Cache Invalidations

If you need to remove a file from MerlinCDN edge caches before it expires, you can either choose file versioning or invalidate the file from MerlinCDN caches.  

If invalidation option is used,  the next time a visitor requests the file, MerlinCDN returns to the origin server to get the latest version of the file

You can use MerlinCDN Management panel or API for cache invalidations.  

To manage cache invalidations on MerlinCDN Management Panel:

  1. Log in to MerlinCDN Management panel 
  2. In the left navigation sidebar click Distributions 
  3. Select the distribution you need to invalidate content from 
  4. Click on Cache Invalidations on the menu (1) 
  5. Click on Create Cache Invalidation button (2)

cdn-cache-invalidation

      6. Enter path to invalidate cache 

invalidation-type

Invalidation Types

MerlinCDN has 2 types of cache invalidation. Wildcard and Instant Cache Invalidations can be used for different scenarios.

Instant Cache Invalidation
Instant Cache Invalidation used for a single cache object. Compared to Wildcard it is faster but only works for a single object. Cache object path which will be purged must specified in the input area. Example usage:

individual-files

Since Instant Cache Invalidation is used for a single object it can not be used:

  • with inputs like  /* or /folder/*
  • Cache Based on Selected Request Headers: MerlinCDN creates a new cache object for every value of the selected header thus there will be multiple object for the given path.
  • Query String Forwarding and Caching: MerlinCDN creates a new cache object for every value of the query strings thus there will be multiple object for the given path.

Wildcard Cache Invalidation

Wildcard Cache Invalidation used for multiple cache objects. To purge all caches you can enter /* to the input area or you can specify a smaller folder or path. Example usage:


wildcard-paths

In situations that Instant Cache Invalidation can not be used (stated above in Instant Cache Invalidation) you can use Wildcard Cache Invalidation.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.