Optimize user login
Most of the times users are logged using "admin" user, but in many cases OrientDB executes a query against the database (HTTP access). We'd need to cache at least "admin" user, or the most used with a LRU cache.
Implemented used a ConcurrentLinkedHashMap limite to 100, by default, defined by the new setting:
SECURITY_MAX_CACHED_USERS("security.maxCachedUsers", "Maximum users cached in RAM. This speeds up authentication for the most used users",
Integer.class, 100),
Hi, Luca. what do you mean by "cached user"? Do you intend to store users' credential in memory so to avoid db access to authenticate them?
I want to store in RAM OUser objects.
I've introduced also caching for roles, to allow all test against restricted to pass.
Ok, I see. Just pay attention in case users change their password or roles.
Yes, the trigger on user change remove the object from the cache to force reloading.
@lvca what about remote client? how does remote client will figure out that user is changed on server by someone else?
@enisher remote clients don't cache them.
On HTTP requests the improvement is huge.
+80% on diple HTTP GET requests