Interface CacheManager


  • public interface CacheManager
    Lightweight interface for caching in Profile2
    Author:
    Steve Swinsburg (steve.swinsburg@gmail.com)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <K,​V>
      org.sakaiproject.memory.api.Cache<K,​V>
      createCache​(String cacheName)
      Create a cache.
      <K,​V>
      void
      evictFromCache​(org.sakaiproject.memory.api.Cache<K,​V> cache, K cacheKey)
      Helper to evict an item from a given cache.
    • Method Detail

      • createCache

        <K,​V> org.sakaiproject.memory.api.Cache<K,​V> createCache​(String cacheName)
        Create a cache.
        Parameters:
        cacheName -
        Returns:
      • evictFromCache

        <K,​V> void evictFromCache​(org.sakaiproject.memory.api.Cache<K,​V> cache,
                                        K cacheKey)
        Helper to evict an item from a given cache.
        Parameters:
        cache - the cache to evict from
        cacheKey - the id for the data in the cache