# Invalidation

Invalidation is the process of removing outdated cached versions of assets from the Content Delivery Network (CDN) to ensure updates are visible to users.&#x20;

DAM automatically invalidates the old version of the asset when a new version is created. Users with Developer, Manager, Administrator or Owner [User Levels](https://docs.scaleflex.com/vxp-visual-experience-platform/settings/organisation/users/users) can perform invalidations manually.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F4oTbZdSTjdZ2KwvsuSB5%2Finvalidation.png?alt=media&#x26;token=9edd9736-2930-4a48-9966-8830567a670d" alt=""><figcaption></figcaption></figure>

## Steps to perform Invalidation

1. Go to [Optimization > Invalidation](https://hub.scaleflex.com/dmo/invalidation) page
2. Click on the + **Add Invalidation form** button.
3. Choose the Invalidation scope:
   1. **Original** - deletes the cache of individual assets.&#x20;
      * Provide up to 5-10 URLs in format `/folder1/folder2/filename.xxx`   (Example: `/campaigns/winter_sale/banner.jpg`).&#x20;
      * Separate the URLs with commas or line breaks.&#x20;
      * Do not include query string parameters at the end of the URL (e.g. `?w=600`). These will be ignored during invalidation.
   2. **All** - deletes the entire cache of the project from the CDN and the resizing servers. Please pay notice that after invalidation the cache needs to rebuild again and the very first requests take more time for delivery.&#x20;

When the Invalidation request is submitted, it appears in the Invalidation log. Both manual and automatic invalidations are logged there.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2Fne0hdGeN94uTaTz3unl0%2FScreenshot%202024-11-05%20at%2017.53.46.png?alt=media&#x26;token=91684f95-375a-4a98-ac7b-7f46791c36a1" alt=""><figcaption></figcaption></figure>

## Details of the Invalidation request

Every request has the following parameters:

* Invalidation ID - the unique identifier of the request
* Scope - the scope of the request (original / all)
* Date - the datetime when the request has been submitted for execution. The value is in the local time zone.
* Status - the status of the request:
  * **Received** - request received successfully
  * **Preparing** - the Invalidation server prepares the request for execution
  * **Flushing Scaleflex servers** - deleting the cache in the resizing servers
  * **Flushing CDN servers** - deleting the cache of the CDN servers
  * **Done** - the invalidation finished successfully
  * **ERROR\_CDN\_NODE** - error in the CDN invalidation step
  * **ERROR** - general error in some of the invalidation steps

{% hint style="info" %}
If you encounter ERROR or ERROR\_CDN\_NODE, retry or [contact support](https://scaleflex.zendesk.com/hc/en-gb/requests/new).
{% endhint %}

* Invalidation path - if you click on "See links", you can inspect which URLs have been requested for invalidation (applicable for the invalidations with scope "original")
* Retry - you can retry the invalidation in case of need

Click the refresh icon (next to **+ Add Invalidation form**) to reload the invalidation log and view the latest updates.

## Invalidation API

You can automate this process using the [Invalidation API](https://developers.scaleflex.com/#85431959-d1af-41d0-b8bb-7149b724ae28). Refer to the API documentation for request format, authentication, and example use cases.
