# Disabled User Cache in Keycloak

**URL:** <https://forum.keycloak.org/t/disabled-user-cache-in-keycloak/28520>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [October 29, 2024, 6:51pm UTC](https://forum.keycloak.org/t/disabled-user-cache-in-keycloak/28520 "2024-10-29T18:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FedericoCaimi](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/federicocaimi/32/10889_2.png) [@FedericoCaimi](https://forum.keycloak.org/u/FedericoCaimi)\
**Post date:** [October 29, 2024, 6:51pm UTC](https://forum.keycloak.org/t/disabled-user-cache-in-keycloak/28520/1 "2024-10-29T18:51:24Z")

</div>

Hi, Im having an issue with Keycloaks cache, when i update a users email in my database and test the 2FA flow via email, i see that Keycloak is still using the old cached email.

would like to know if there is a way to disable the user cache in Keycloak 25.0.1 via configuration (such as in keycloak.conf), as I’d prefer not to restart Keycloak or clear the cache manually with a POST to [http://localhost:8080/admin/realms/master/clear-realm-cache](http://localhost:8080/admin/realms/master/clear-realm-cache)

y have tried adding this to Keycloak.conf:

user-cache-enabled=false , but it didnt work!

Any suggestions would be appreciated!

---

<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:** [October 29, 2024, 7:04pm UTC](https://forum.keycloak.org/t/disabled-user-cache-in-keycloak/28520/2 "2024-10-29T19:04:33Z")

</div>

Disabling the cache is not a good idea as it is here for performance reasons. Disabling the cache is AFAIK also not possible.  
Manipulating data directly in the DB is also not a good idea and always the last thing you want to do. The admin API is here for manipulating/managing the data.
