Purge videos from the cache

If you modify a video file, you should purge it from the cache. This ensures that Image and Video Manager generates fresh derivatives using the new version of the video.

Image and Video Manager supports these purging methods:

  • Fast Purge (by URL, CP Code, or ARL)
  • Enhanced Content Control Utility by directory or extension

Videos can be cached in several places. Before purging, do the following:

  • Remove the out-of-date videos from the origin server.
  • Clear your browser cache and history.
  • Clear the videos from any middle proxy caches in your local environment.

Example:

For this URL

https://www.example.com/Resources/example/videos/1_store_1_90.mp4?323

the cache key becomes:

 L1/L/4321/123456/30d/www.example.com/Resources/example/videos/1_store_1_90.mp4 cid=___IM_FILE_NAME=.auto.1.5000.chrome&IM_API_TOKEN=www.example.com-10506295&IM_COMB_ON=true

You can purge either of these URLs:

http://www.example.com/Resources/example/videos/1_store_1_90.mp4
http://www.example.com/Resources/example/videos/1_store_1_90.mp4?323

Both URLs use the same cache key so purging either will remove the object.

📘

Query parameters are stripped in the product. This means that query parameters are not included in the cache key even if they are present in the original request.

Use the Content Control Utility to purge videos

In most cases, you can use the Content Control Utility's Fast Purge feature. Alternatively, you can automate cache purging requests with the Enhanced Content Control utility API.

With either tool, choose the option to purge by URL, and submit the list of URLs for all changed videos. Typically, you should purge the cache with "Invalidate" rather than "Delete". For more information see Purge methods.

For detailed instructions, see:

Special Considerations for Origin Base Path

When applied to Image and Video Manager requests, the Origin Base Path behavior creates different cache keys for derivative and pristine videos.

To purge both versions, submit a second URL with a query string parameter that disables Image and Video Manager (?imbypass=true).

In this example versions of product123.mp4 and product456.mp4 are now available on your origin. The Image and Video Manager rule that processes these video requests contains the Origin Base Path behavior.

Submit a purge request containing the following URLs:

https://www.example.com/videos/product123.mp4?imbypass=true
https://www.example.com/videos/product456.mp4?imbypass=true
https://www.example.com/videos/product123.mp4
https://www.example.com/videos/product456.mp4

Purging the first two URLs clears the old pristine videos from the cache. Purging the second two URLs clears the derivative videos.

🚧

To purge both versions, the pristine videos purge must be submitted before purging the derivative videos.