public CachingProjectRoleAndActorStore(final ProjectRoleAndActorStore delegate, final RoleActorFactory roleActorFactory, final CacheManager cacheManager) { this.delegate = delegate; this.roleActorFactory = roleActorFactory; this.projectRoles = cacheManager.getCachedReference(getClass(), "projectRoles", new AllProjectRolesLoader()); this.defaultRoleActors = cacheManager.getCache(getClass().getName() + ".defaultRoleActors", new DefaultRoleActorsLoader()); this.projectRoleActors = cacheManager.getCache(getClass().getName() + ".projectRoleActors", new ProjectRoleActorsLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }