---
title: "Clearing the cache after editing records"
manual: "Events2"
version: "11.1"
permalink: "https://docs.typo3.org/permalink/jweiland/events2:clearcache@11.1"
source: "AdministratorManual/BestPractice/ClearCache/Index.rst"
rendered: "2026-11-05T08:42:15+00:00"
---

# Clearing the cache after editing records {#clearcache}

Events2 has a built-in mechanism that takes care of clearing the cache after manipulation of Event records.

When a list or detail view is rendered on a page, a cache tag in format `tx_events2_pid_PID` (where PID is
the uid of the events storage folder) is added. Each time an event record is edited, deleted or created, this
cache entry is flushed. No additional cache configuration is needed if only the Event plugins are used.

If you use other ways of displaying event records, the cache is not flushed automatically.

This can be done automatically by using this command in the PageTsConfig:

```typoscript
TCEMAIN.clearCacheCmd = 123,124,125
```

The code needs to be added to the sys folder where the event records are edited. Change the example page ids to
the ones which should be cleared.
