@Override
public ActorRef startEnforcerActor(final ActorContext context, final ConciergeConfigReader configReader,
final ActorRef pubSubMediator) {
final Duration askTimeout = configReader.caches().askTimeout();
final ActorSystem actorSystem = context.system();
final ActorRef policiesShardRegionProxy = startProxy(actorSystem, configReader.cluster().numberOfShards(),
PoliciesMessagingConstants.SHARD_REGION, PoliciesMessagingConstants.CLUSTER_ROLE);
final ActorRef thingsShardRegionProxy = startProxy(actorSystem, configReader.cluster().numberOfShards(),
ThingsMessagingConstants.SHARD_REGION, ThingsMessagingConstants.CLUSTER_ROLE);
new ThingEnforcementIdCacheLoader(askTimeout, thingsShardRegionProxy);
final Cache<EntityId, Entry<EntityId>> thingIdCache =
CacheFactory.createCache(thingEnforcerIdCacheLoader, configReader.caches().id(),
ID_CACHE_METRIC_NAME_PREFIX + ThingCommand.RESOURCE_TYPE,
actorSystem.dispatchers().lookup("thing-id-cache-dispatcher"));
new PolicyEnforcerCacheLoader(askTimeout, policiesShardRegionProxy);
final Cache<EntityId, Entry<Enforcer>> policyEnforcerCache =
CacheFactory.createCache(policyEnforcerCacheLoader, configReader.caches().enforcer(),
ENFORCER_CACHE_METRIC_NAME_PREFIX + "policy",
actorSystem.dispatchers().lookup("policy-enforcer-cache-dispatcher"));
new AclEnforcerCacheLoader(askTimeout, thingsShardRegionProxy);
final Cache<EntityId, Entry<Enforcer>> aclEnforcerCache =
CacheFactory.createCache(aclEnforcerCacheLoader, configReader.caches().enforcer(),
ENFORCER_CACHE_METRIC_NAME_PREFIX + "acl",
actorSystem.dispatchers().lookup("acl-enforcer-cache-dispatcher"));