Interface CacheAccessor<T extends SimpleCache>
- Type Parameters:
T- the concrete type ofSimpleCache
- All Known Implementing Classes:
ApplicationCacheAccessor,ThreadCacheAccessor
public interface CacheAccessor<T extends SimpleCache>
An accessor to a cache. A cache accessor should be a singleton. Each type of cache should have
their own accessor and this is by the accessor a cache is got. The accessor is a way to abstract
the life-cycle of a cache as this life-cycle shouldn't be managed by the clients but by the
Silverpeas Cache API implementation itself.
- Author:
- mmoquillon
-
Method Summary
-
Method Details
-
getCache
T getCache()Gets an instance of the cache referred by this accessor. Despite the method can return at each call either the same instance or different instances, the cache represented by the instances will be the same.- Returns:
- the cache referred by this accessor.
-