I suggest you to read Configuring distributed caches - Keycloak part of the documentation it briefly covers the caching mechanism of Keycloak.
Cache policy determines how caching is managed for different types of data to improve performance and reduce the load on the database.
I believe caching is something which should be tailored for your use case. Think about the trade-offs, how tolerable to use cached data for your system instead of re-querying it every time ?
@ozdemirrulass Thank you for your response. I investigate how to integrate caching on my custom provider (jdbc). What are the recommended interfaces that i should implement? I have seen as candidates OnUserCache. Is it enough? Do you have any recommendation on that?