# Flush a custom cache instance

**URL:** <https://forum.getkirby.com/t/flush-a-custom-cache-instance/14722>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 26, 2019, 10:34am UTC](https://forum.getkirby.com/t/flush-a-custom-cache-instance/14722 "2019-06-26T10:34:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastiangreger](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/sebastiangreger/32/16176_2.png) [@sebastiangreger](https://forum.getkirby.com/u/sebastiangreger)\
**Post date:** [June 26, 2019, 10:34am UTC](https://forum.getkirby.com/t/flush-a-custom-cache-instance/14722/1 "2019-06-26T10:34:56Z")

</div>

I am using a custom cache (set up in my `config.php`, not in a plugin) and the example at [Caching | Kirby CMS](https://getkirby.com/docs/guide/cache#using-the-cache) is very helpful; only: I can’t figure out how to flush that specific cache?

Use case: I am caching a complex, pre-processed list of content elements for use in a template and would like to flush it using a `page.update:after` hook when content changes.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 26, 2019, 10:54am UTC](https://forum.getkirby.com/t/flush-a-custom-cache-instance/14722/2 "2019-06-26T10:54:16Z")

</div>

```auto
$apiCache->flush()

```

should do the job.

---

<div class="post-metadata">

**Author:** ![sebastiangreger](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/sebastiangreger/32/16176_2.png) [@sebastiangreger](https://forum.getkirby.com/u/sebastiangreger)\
**Post date:** [June 26, 2019, 11:29am UTC](https://forum.getkirby.com/t/flush-a-custom-cache-instance/14722/3 "2019-06-26T11:29:45Z")

</div>

It does indeed! Thank you 🕶
