- All Known Implementing Classes:
CacheInstancePerScopeProvider,DefaultCacheProvider
public interface CacheProvider
A provider for a specific
Cache implementation. Via this plug-in construct, the OmniFaces Cache component can
make use of different kinds of cache implementations.- Since:
- 1.1
- Author:
- Arjan Tijms
-
Method Summary
Modifier and TypeMethodDescriptiongetCache(FacesContext context, String scope) Gets an instance of a Cache using the configured cache provider.voidsetParameters(Map<String, String> parameters) Passes parameters to the cache provider implementation.
-
Method Details
-
getCache
Gets an instance of a Cache using the configured cache provider.- Parameters:
context- faces context used for resolving the given scope.scope- scope for which the cache should be obtained. Supported scopes are dependent on the specific caching provider, but generally at least "session" and "application" should be supported.- Returns:
- Cache instance encapsulating the cache represented by this CacheProvider
-
setParameters
Passes parameters to the cache provider implementation. This is mainly intended for configuration of things like LRU and global TTL. Settings are mainly implementation specific.- Parameters:
parameters- map of parameters used to configure the cache.
-