Class BasicHttpCacheStorage

  • All Implemented Interfaces:
    HttpCacheStorage

    @Contract(threading=SAFE)
    public class BasicHttpCacheStorage
    extends java.lang.Object
    implements HttpCacheStorage
    Basic HttpCacheStorage implementation backed by an instance of LinkedHashMap. In other words, cache entries and the cached response bodies are held in-memory. This cache does NOT deallocate resources associated with the cache entries; it is intended for use with HeapResource and similar. This is the default cache storage backend used by CachingHttpClients.
    Since:
    4.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private CacheMap entries  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​HttpCacheEntry> getEntries​(java.util.Collection<java.lang.String> keys)
      Retrieves multiple cache entries stored under the given keys.
      HttpCacheEntry getEntry​(java.lang.String url)
      Gets an entry from the cache, if it exists
      void putEntry​(java.lang.String url, HttpCacheEntry entry)
      Places a HttpCacheEntry in the cache
      void removeEntry​(java.lang.String url)
      Removes a HttpCacheEntry from the cache
      void updateEntry​(java.lang.String url, HttpCacheCASOperation casOperation)
      Atomically applies the given callback to processChallenge an existing cache entry under a given key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait