@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public CasEventRepository casEventRepository(
        @Qualifier("casEventRepositoryFilter")
        final CasEventRepositoryFilter casEventRepositoryFilter) {
        final LoadingCache<String, CasEvent> storage = Caffeine.newBuilder()
            .initialCapacity(INITIAL_CACHE_SIZE)
            .maximumSize(MAX_CACHE_SIZE)
            .recordStats()
            .expireAfterWrite(Duration.ofHours(EXPIRATION_TIME))
            .build(s -> {
                LOGGER.error("Load operation of the cache is not supported.");
                return null;
            });
        LOGGER.debug("Created an in-memory event repository to store CAS events for [{}] hours", EXPIRATION_TIME);
        return new InMemoryCasEventRepository(casEventRepositoryFilter, storage);
    }
This is {@link CasEventsInMemoryRepositoryAutoConfiguration}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-events-memory/src/main/java/org/apereo/cas/config/CasEventsInMemoryRepositoryAutoConfiguration.java