
com.sdl.dxa.caching.NamedCacheProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dxa-common Show documentation
Show all versions of dxa-common Show documentation
DXA Common project contains framework common classes shared between all other artifacts
package com.sdl.dxa.caching;
import javax.cache.Cache;
import javax.cache.CacheManager;
import java.util.Collection;
/**
* Cache provider fox DXA that prefers cache name over types.
*
*/
public interface NamedCacheProvider {
/**
* Provides cache with the given name for the given key and value types.
* Should never return {@code null}, hence should create cache if not found.
*
* @param cacheName name of the cache to be created
* @param keyType type of the key
* @param valueType type of the value
* @param generic type for key
* @param generic type for value
* @return cache instance, never {@code null} by convention
*/
Cache getCache(String cacheName, Class keyType, Class valueType);
/**
* Provides cache with the given name for the given key and value types.
* Should never return {@code null}, hence should create cache if not found.
*
* @param cacheName name of the cache to be created
* @return cache instance, never {@code null} by convention
*/
Cache
© 2015 - 2025 Weber Informatics LLC | Privacy Policy