Clearing caches

With the cache integration enabled, it may be useful to clear the content of the remote caches or see if an item is available in the remote cache.

These URLs are only available in testing environments where the dataset provider is installed.

To clear caches in a production environment or a setup without caches, see the server administration guide for more details.

Clearing some of the caches is also available via the Keycloak Admin UI when logged in as an administrator in the master realm via the drop-down menu in the upper right corner.

Clearing caches and remote caches

Those endpoints are not directly to dataset or performance tests, however they are generally useful for those cases. They are useful just with the RHDG integration enabled.

Clear all the items in the specified cache - in this case cache sessions:

http://localhost:8080/auth/realms/master/cache/sessions/clear

Clear all session related caches:

http://localhost:8080/auth/realms/master/cache/clear-sessions

Clear all the items in the specified remote cache - in this case cache sessions:

http://localhost:8080/auth/realms/master/remote-cache/sessions/clear

See the count of items in all the available caches and remote caches:

http://localhost:8080/auth/realms/master/cache/sizes

See if item with ID "123" exists in the specified cache:

http://localhost:8080/auth/realms/master/cache/sessions/contains/123

See if item with ID "123" exists in the specified remote cache:

http://localhost:8080/auth/realms/master/remote-cache/sessions/contains/123