Interface CacheRegistry


public interface CacheRegistry
Owns the plugin's caches, so each can be built from config and cleared on reload.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(CacheName cacheName)
    Builds one cache, replacing it if it already exists.
    void
    Builds every cache from the sizes and lifetimes in the config.
    void
    Empties every cache.
    boolean
    invalidate(CacheName cacheName)
    Empties one cache.
  • Method Details

    • init

      void init()
      Builds every cache from the sizes and lifetimes in the config.
    • invalidate

      void invalidate()
      Empties every cache.
    • create

      void create(CacheName cacheName)
      Builds one cache, replacing it if it already exists.
      Parameters:
      cacheName - which cache to build
    • invalidate

      boolean invalidate(CacheName cacheName)
      Empties one cache.
      Parameters:
      cacheName - which cache to empty
      Returns:
      true if the cache existed