---
title: Reference - Cache dependency keys
related:
  - https://docs.kentico.com/documentation/developers-and-admins/development/caching/cache-dependencies.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

This page list dummy cache keys and their format for all supported objects in the system.

> **Tip:** Avoid setting dependencies on all objects of a particular type via `|all`. Clearing the cache every time any object of a given type changes has a high chance of significantly reducing the effectivness of your caching solution. Always prefer targeting specific objects either via code name or GUID.

## Reusable content items

The following cache keys are touched when the **Published** version of the target reusable [content item](https://docs.kentico.com/documentation/business-users/content-hub.md) changes.

> **Info:** If you need to set cache dependencies for other workflow states, use the  `contentitem|allstates|*`  prefix. Where  `*`  can be substituted for any expression from the table that begins with  `contentitem`. For example:
>
> - `contentitem|allstates|all`
> - `contentitem|allstates|byschema|MySchema`

| Dependency on                                                                                                                                  | Cache key format                                                                                            | Description                                                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| All items                                                                                                                                      | contentitem\|all<br>**Example:**<br>`contentitem\|all`                                                      | Targets all items in the system.                                                                                                                                                                                                                                                                     |
| ID                                                                                                                                             | contentitem\|byid\|<br>**Example:**<br>`contentitem\|byid\|53`                                              | Targets an item by its database ID and optionally language variant.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                                                                                            |
| ID and language variant                                                                                                                        | contentitem\|byid\|\|<br>**Example:**<br>`contentitem\|byid\|53\|czech`                                     |                                                                                                                                                                                                                                                                                                      |
| Code name                                                                                                                                      | contentitem\|byname\|<br>**Example:**<br>`contentitem\|byname\|TheArtOfCoffeeCupping-pzodajb5`              | Targets an item by its code name and optionally language variant.<br>Code names of content items can be found on the **Properties** tab when editing items in the **Content hub** application.<br>`languageName` must match the code name of a language registered in the **Languages** application. |
| Code name and language variant                                                                                                                 | contentitem\|byname\|\|<br>**Example:**<br>`contentitem\|byname\|TheArtOfCoffeeCupping-pzodajb5\|czech`     |                                                                                                                                                                                                                                                                                                      |
| GUID                                                                                                                                           | contentitem\|byguid\|<br>**Example:**<br>`contentitem\|byguid\|affc44f3-...`                                | Targets an item by its GUID and optionally language variant.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                                                                                                   |
| GUID and language variant                                                                                                                      | contentitem\|\|<br>**Example:**<br>`contentitem\|byguid\|affc44f3-...\|czech`                               |                                                                                                                                                                                                                                                                                                      |
| Content type                                                                                                                                   | contentitem\|bycontenttype\|<br>**Example:**<br>`contentitem\|bycontenttype\|Medio.Clinic`                  | Targets all items of the given content type and optionally language variant.<br>`contentType` must match the full code name (namespace and name) of the targeted content type.<br>`languageName` must match the code name of a language registered in the **Languages** application.                 |
| Content type and language variant                                                                                                              | contentitem\|bycontenttype\|\|<br>**Example:**<br>`contentitem\|bycontenttype\|Medio.Clinic\|czech`         |                                                                                                                                                                                                                                                                                                      |
| [Reusable field schema](https://docs.kentico.com/documentation/developers-and-admins/development/content-types/reusable-field-schemas.md) name | contentitem\|byschema\|{schemaname}<br>**Example:**<br>`contentitem\|byschema\|MySchema`                    | Targets all items using the given schema name and optionally language variant.<br>`schemaname` must match the name of the targeted schema.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                     |
| Reusable field schema name and item language variant                                                                                           | contentitem\|byschema\|{schemaname}\|{language}<br>**Example:**<br>`contentitem\|byschema\|MySchema\|czech` |                                                                                                                                                                                                                                                                                                      |

## Pages

The following cache keys are touched when the **Published** version of the target [page](https://docs.kentico.com/documentation/business-users/website-content.md) changes.

If you need to set cache dependencies for other workflow states, use the `webpageitem|allstates|*` prefix. Where `*` can be substituted for any expression from the table, omitting the `webpageitem` prefix. For example: `webpageitem|allstates|all`.

| Dependency on                                                                                                                                  | Cache key format                                                                                                                                        | Description                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| All                                                                                                                                            | webpageitem\|all<br>**Example:**<br>`webpageitem\|all`                                                                                                  | Targets all pages in the system.                                                                                                                                                                                                                                                                                      |
| All in website channel                                                                                                                         | webpageitem\|bychannel\|\|all<br>**Example:** `webpageitem\|bychannel\|MyChannel\|all`                                                                  | Targets all pages under the specified website channel.                                                                                                                                                                                                                                                                |
| ID                                                                                                                                             | webpageitem\|byid\|<br>**Example:**<br>`webpageitem\|byid\|53`                                                                                          | Targets a page by it's database ID and optionally language variant.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                                                                                                             |
| ID and language variant                                                                                                                        | webpageitem\|byid\|\|<br>**Example:**<br>`webpageitem\|byid\|53\|czech`                                                                                 |                                                                                                                                                                                                                                                                                                                       |
| Code name                                                                                                                                      | webpageitem\|byname\|<br>**Example:**<br>`webpageitem\|byname\|TheArtOfCoffeeCupping-pzodajb5`                                                          | Targets a page by its code name and optionally language variant.<br>The code name of a page can be found on the **Properties** tab when viewing pages under website channels.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                   |
| Code name and language variant                                                                                                                 | webpageitem\|byname\|\|<br>**Example:**<br>`webpageitem\|byname\|TheArtOfCoffeeCupping-pzodajb5\|czech`                                                 |                                                                                                                                                                                                                                                                                                                       |
| GUID                                                                                                                                           | webpageitem\|byguid\|<br>**Example:**<br>`webpageitem\|byguid\|affc44f3-...`                                                                            | Targets an item by its GUID and optionally language variant.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                                                                                                                    |
| GUID and language variant                                                                                                                      | webpageitem\|byguid\|\|<br>**Example:**<br>`webpageitem\|byguid\|affc44f3-...\|czech`                                                                   |                                                                                                                                                                                                                                                                                                                       |
| Content type in website channel                                                                                                                | webpageitem\|bychannel\|\|bycontenttype\|<br>**Example:**<br>`webpageitem\|bychannel\|MyChannel\|bycontenttype\|My.Article`                             | Targets all pages of the specified content type and optionally language variant in the given channel.<br>`contentType` must match the full code name (namespace and name) of the targeted content type.<br>`languageName` must match the code name of a language registered in the **Languages** application.         |
| Content type in website channel and language variant                                                                                           | webpageitem\|bychannel\|\|bycontenttype\|\|<br>**Example:**<br>`webpageitem\|bychannel\|MyChannel\|bycontenttype\|My.Article\|czech`                    |                                                                                                                                                                                                                                                                                                                       |
| Page path in website channel                                                                                                                   | webpageitem\|bychannel\|\|bypath\|<br>**Example:** `webpageitem\|bychannel\|MyChannel\|bypath\|/Home`                                                   | Targets a page with the specified page path, channel, and optionally language variant.<br>`pagePath` must be a valid tree path.<br>`languageName` must match the code name of a language registered in the **Languages** application.<br>Changing a page's path touches both the old and the new `bypath` dependency. |
| Page path and language variant in website channel                                                                                              | webpageitem\|bychannel\|\|bypath\|\|<br>**Example:** `webpageitem\|bychannel\|MyChannel\|bypath\|/Home\|greek`                                          |                                                                                                                                                                                                                                                                                                                       |
| Page path children in website channel                                                                                                          | webpageitem\|bychannel\|\|childrenofpath\|<br>**Example:** `webpageitem\|bychannel\|MyChannel\|childrenofpath\|/Articles`                               | Targets all children on all sublevels of the specified page path. Optionally targets only specified language variants.<br>`pagePath` must be a valid tree path.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                                 |
| Page path children of language variant in website channel                                                                                      | webpageitem\|bychannel\|\|childrenofpath\|\|<br>**Example:**<br>`webpageitem\|bychannel\|MyChannel\|childrenofpath\|/Articles\|greek`                   |                                                                                                                                                                                                                                                                                                                       |
| [Reusable field schema](https://docs.kentico.com/documentation/developers-and-admins/development/content-types/reusable-field-schemas.md) name | webpageitem\|bychannel\|{channel}\|byschema\|{schemaname}<br>**Example:**<br>`webpageitem\|bychannel\|MyChannel\|byschema\|MySchema`                    | Targets all pages using the specified schema name and optionally language variant in the given channel.<br>`schemaname` must match the name of the targeted schema.<br>`languageName` must match the code name of a language registered in the **Languages** application.                                             |
| Reusable field schema name and page language variant                                                                                           | webpageitem\|bychannel\|{channel}\|byschema\|{schemaname}\|{language}<br>**Example:**<br>`webpageitem\|bychannel\|MyChannel\|byschema\|MySchema\|czech` |                                                                                                                                                                                                                                                                                                                       |

## Reusable field schemas

| Dependency on | Cache key format                                                                               | Description                                                                                                                                                                                                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Schema name   | reusablefieldschema\|byname\|{name}<br>**Example:**<br>`reusablefieldschema\|byname\|MySchema` | Targets a [reusable field schema](https://docs.kentico.com/documentation/developers-and-admins/development/content-types/reusable-field-schemas.md) by its name. Touched when anything related to the schema changes (e.g., schema update, assignment to content type, removal). |

## Media files

| Dependency on | Cache key format | Example                       | Description                                                                                                                                                             |
| ------------- | ---------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GUID          | mediafile\|      | mediafile\|1ced44f3-f2fc- ... | Cache dependencies can only target [media library files](https://docs.kentico.com/documentation/business-users/media-libraries/manage-media-files.md) using their GUID. |

## Settings

| Dependency on | Cache key format          | Description                                                                                                                                      |
| ------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Code name     | cms.settingskey\|byname\| | Targets the [settings](https://docs.kentico.com/documentation/developers-and-admins/configuration/settings.md) specified by the given code name. |

## General objects

| Dependency on | Cache key format | Example                              | Description                                                  |
| ------------- | ---------------- | ------------------------------------ | ------------------------------------------------------------ |
| All           | \|all            | cms.user\|all                        | Targets all administration users in the system.              |
| ID            | \|byid\|         | cms.user\|byid\|53                   | Targets the administration user with the specific ID.        |
| Code name     | \|byname\|       | cms.user\|byname\|administrator      | Targets the administration user with the specific code name. |
| GUID          | \|byguid\|       | cms.user\|byguid\|1ced44f3-f2fc- ... | Targets the administration user with the specific GUID.      |

## Form data records

The system currently does not touch any dummy cache keys when changes occur for data submitted via [forms](https://docs.kentico.com/documentation/business-users/digital-marketing/forms.md).

As a workaround, developers can prepare custom [event handlers](https://docs.kentico.com/documentation/developers-and-admins/customization/handle-global-events.md) for `BizFormItemEvents`. Use the handler method to touch a custom cache key, and then enter the key into your cache dependencies. For example:

```csharp
private void FormItem_InsertAfterHandler(object sender, BizFormItemEventArgs e)
{
    // Touches a custom cache key, for example: "customformdata|bizform.contactus"
    CacheHelper.TouchKey("customformdata|" + e.Item.BizFormClassName);
}
```
