# How does Realm cache invalidation works in Keycloak

**URL:** <https://forum.keycloak.org/t/how-does-realm-cache-invalidation-works-in-keycloak/14030>\
**Category:** Getting advice\
**Created:** [March 4, 2022, 12:04pm UTC](https://forum.keycloak.org/t/how-does-realm-cache-invalidation-works-in-keycloak/14030 "2022-03-04T12:04:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![srijan](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/srijan/32/1965_2.png) [@srijan](https://forum.keycloak.org/u/srijan)\
**Post date:** [March 4, 2022, 12:04pm UTC](https://forum.keycloak.org/t/how-does-realm-cache-invalidation-works-in-keycloak/14030/1 "2022-03-04T12:04:43Z")

</div>

We are looking into how we can invalidate Realm cache on our local Keycloak instance. Few action steps that have been tried so far are:

- Create N no. of realms and clients
- Delete N number of realms

However, this does not seem to invalidate the cache(we think!) since the GET “/realms” endpoint loads pretty quickly (4.2s) than otherwise which usually take \> 1minute. We’re dealing with more than 300 realms here.

Any insights on this would be helpful.
