Class CacheImpl

java.lang.Object
com.skava.auth.helper.CacheImpl
Direct Known Subclasses:
GetAllCollectionServiceImpl

@Service public class CacheImpl extends Object
This class used to handle the caching operation of the entities for quick response without accessing data repositories.
Author:
Infosys Equinox
  • Field Details

    • SESSION_CACHE_NAME

      public static final String SESSION_CACHE_NAME
      The Constant SESSION_CACHE_NAME.
      See Also:
    • AUTH_GRAND_CACHE_NAME

      public static final String AUTH_GRAND_CACHE_NAME
      The Constant AUTH_GRAND_CACHE_NAME.
      See Also:
    • COLLECTION_CACHE_NAME

      public static final String COLLECTION_CACHE_NAME
      The Constant COLLECTION_CACHE_NAME.
      See Also:
    • GUEST_SESSION_CACHE_NAME

      public static final String GUEST_SESSION_CACHE_NAME
      The Constant GUEST_SESSION_CACHE_NAME.
      See Also:
    • OAUTH_CLIENT_CACHE_NAME

      public static final String OAUTH_CLIENT_CACHE_NAME
      The Constant OAUTH_CLIENT_CACHE_NAME.
      See Also:
    • OAUTH_CLIENT_PUBLIC_KEY_CACHE_NAME

      public static final String OAUTH_CLIENT_PUBLIC_KEY_CACHE_NAME
      The Constant OAUTH_CLIENT_PUBLIC_KEY_CACHE_NAME.
      See Also:
    • TOKEN_EXPIRE_TIME_CACHE_NAME

      public static final String TOKEN_EXPIRE_TIME_CACHE_NAME
      The Constant TOKEN_EXPIRE_TIME_CACHE_NAME.
      See Also:
  • Constructor Details

    • CacheImpl

      public CacheImpl()
  • Method Details

    • cacheNames

      public static Set<String> cacheNames()
    • getCache

      public org.springframework.cache.Cache getCache(String cacheName)

      getCache.

      Parameters:
      cacheName - a String object.
      Returns:
      a Object object.
    • getValueFromCache

      public <T> T getValueFromCache(String cacheName, String key, Class<T> type)
    • saveDetailsToCache

      public <T> Object saveDetailsToCache(String cacheName, String cacheKey, T value)
      Type Parameters:
      T - a Serializable object.
      Parameters:
      cacheName - a String object.
      cacheKey - a String object.
      value - a Serializable object.
      Returns:
      a Object object.
    • deleteCacheWithKey

      public Object deleteCacheWithKey(String cacheName, String cacheKey)

      deleteCacheWithKey.

      Parameters:
      cacheName - a String object.
      cacheKey - a String object.
      Returns:
      a Object object.
    • deleteCache

      public Object deleteCache(String cacheName)

      deleteCache.

      Parameters:
      cacheName - a String object.
      Returns:
      a Object object.
    • clearCache

      public void clearCache(Set<String> cacheNames)
    • putValueWithExpireTime

      public <T> void putValueWithExpireTime(String cacheName, String key, T value, long timeout, TimeUnit unit)
    • getValue

      public Object getValue(String cacheName, String key)