Search in sources :

Example 1 with ExpiringValueCache

use of org.eclipse.hono.cache.ExpiringValueCache in project hono by eclipse.

the class SpringCacheProvider method getCache.

@Override
public <K, V> ExpiringValueCache<K, V> getCache(String cacheName) {
    requireNonNull(cacheName);
    final Cache cache = this.manager.getCache(cacheName);
    if (cache == null) {
        return null;
    }
    return new SpringBasedExpiringValueCache<>(cache);
}
Also used : Cache(org.springframework.cache.Cache) ExpiringValueCache(org.eclipse.hono.cache.ExpiringValueCache)

Aggregations

ExpiringValueCache (org.eclipse.hono.cache.ExpiringValueCache)1 Cache (org.springframework.cache.Cache)1