Make the UserAndRoleDirectoryService cache configurable

Description

The kernel UserAndRoleDirectoryServiceImpl.java cache is hard-coded for 1 minute expiry time with maximum size of 200 users:

UserAndRoleDirectoryServiceImpl.java:
private final LoadingCache<Tuple<String, String>, Object> cache = CacheBuilder.newBuilder()
.expireAfterWrite(1, TimeUnit.MINUTES).maximumSize(200).build(userLoader);

This is OK for small installations, but probably sub-optimal for larger sites with many users (e.g. accessing Opencast through LTI or external auth mechanisms), especially on the admin/presentation nodes.

Another reason for developers to set a longer cache time on local builds is that so cache invalidation errors (e.g. when a user or group is updated) are more noticeable.

Activity

Show:
Tobias Schiebeck
March 23, 2017, 12:32 PM

Merged as PR 1355 commit 772ff6a

Fixed and reviewed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Stephen Marquard