Class SpringCache<K,V>

java.lang.Object
com.okta.spring.boot.sdk.cache.SpringCache<K,V>
Type Parameters:
K - The cache key type
V - The cache value type
All Implemented Interfaces:
com.okta.sdk.cache.Cache<K,V>

public class SpringCache<K,V> extends Object implements com.okta.sdk.cache.Cache<K,V>
A Okta SDK Cache implementation that wraps a Spring Cache instance. This allows the Okta SDK to use your existing Spring caching mechanism so you only need to configure one caching implementation.

This implementation effectively acts as an adapter or bridge from the Okta SDK cache API to the Spring cache API.

Since:
0.3.0
  • Constructor Details

    • SpringCache

      public SpringCache(org.springframework.cache.Cache springCache)
  • Method Details

    • get

      public V get(K key)
      Specified by:
      get in interface com.okta.sdk.cache.Cache<K,V>
    • put

      public V put(K key, V value)
      Specified by:
      put in interface com.okta.sdk.cache.Cache<K,V>
    • remove

      public V remove(K key)
      Specified by:
      remove in interface com.okta.sdk.cache.Cache<K,V>