# Realm cache entries are greater than the number of realms

**URL:** <https://forum.keycloak.org/t/realm-cache-entries-are-greater-than-the-number-of-realms/27277>\
**Category:** Miscellanaeous\
**Created:** [August 1, 2024, 3:53pm UTC](https://forum.keycloak.org/t/realm-cache-entries-are-greater-than-the-number-of-realms/27277 "2024-08-01T15:53:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phowells](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/phowells/32/11015_2.png) [@phowells](https://forum.keycloak.org/u/phowells)\
**Post date:** [August 1, 2024, 3:53pm UTC](https://forum.keycloak.org/t/realm-cache-entries-are-greater-than-the-number-of-realms/27277/1 "2024-08-01T15:53:24Z")

</div>

Hello,

I have a Keycloak cluster using an external Infinispan cluster. The realm cache is configured locally for the Keycloak nodes with a replicated “work” cache in Infinispan.

I have one “test” realm configured in addition to the master realm. When I run my load/performance tests using the “test” realm I see that the realm cache jumps up to hundreds of entries.

I assumed that the realm cache would contain one entry per realm but this does not appear to be the case.

Can somebody explain why I am seeing so many realm cache entries? Is this expected or does this indicate that I may have a problem with my configuration?

Thanks  
Paul

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [August 1, 2024, 4:22pm UTC](https://forum.keycloak.org/t/realm-cache-entries-are-greater-than-the-number-of-realms/27277/2 "2024-08-01T16:22:44Z")

</div>

From the [docs](https://www.keycloak.org/server/caching#_cache_types_and_defaults):

> - **realms** and related data like clients, roles, and groups.

---

<div class="post-metadata">

**Author:** ![phowells](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/phowells/32/11015_2.png) [@phowells](https://forum.keycloak.org/u/phowells)\
**Post date:** [August 1, 2024, 4:42pm UTC](https://forum.keycloak.org/t/realm-cache-entries-are-greater-than-the-number-of-realms/27277/3 "2024-08-01T16:42:24Z")

</div>

Well that makes perfect sense. Thank you for taking the time to respond.
