Class NoCache

java.lang.Object
com.maxmind.db.NoCache
All Implemented Interfaces:
NodeCache

public final class NoCache extends Object implements NodeCache
A no-op cache singleton.
  • Method Details

    • get

      public DecodedValue get(CacheKey key, NodeCache.Loader loader) throws IOException
      Description copied from interface: NodeCache
      This method returns the value for the key. If the key is not in the cache then the loader is called to load the value.
      Specified by:
      get in interface NodeCache
      Parameters:
      key - the key to look up
      loader - the loader to use if the key is not in the cache
      Returns:
      the value for the key
      Throws:
      IOException - if there is an error loading the value
    • getInstance

      public static NoCache getInstance()
      Returns:
      the singleton instance of the NoCache class