[keycloak-dev] top-level cache strategy

Bill Burke bburke at redhat.com
Fri Jun 20 11:23:17 EDT 2014


Last week I put in a cache that sits on top of our model API.  I'm going 
to continue with it and *not* use any caching implementation like 
Infinispan.  Here's what it will look like:

* Provider SPI for cache implementation
* Simple hand made cluster cache for Keycloak as follows:
- Cache is currently loaded on demand
- Cached objects are read-only and are invalidated at end of transaction 
if changed.
- ConcurentHashMaps for non-user information.
- LRU cache for UserModel and Credentials.  This will be a synchronized 
LinkedHashMap.
- Cluster nodes will be defined manually in keycloak-server.json under 
the cache scope.
- Simple secure invalidation REST API
- Simple secure ping REST API
- If a remote invalidation or ping fails, then cache will be wiped and 
disabled until a ping can be re-established.

I don't think any of this is much work.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-dev mailing list