Class CachingHttpContentFactory

All Implemented Interfaces:
HttpContent.Factory, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
Direct Known Subclasses:
ValidatingCachingHttpContentFactory

@ManagedObject public class CachingHttpContentFactory extends ContainerLifeCycle implements HttpContent.Factory

HttpContent.Factory implementation that wraps any other HttpContent.Factory instance using it as a caching authority. Only HttpContent instances whose path is not a directory are cached.

No eviction is done by this HttpContent.Factory, once an entry is in the cache it is always assumed to be valid. This class can be extended to implement the validation behaviors on CachingHttpContentFactory.CachingHttpContent which allow entries to be evicted once they become invalid.


The default values for the cache are:
  • maxCachedFileSize: 268435456L
  • maxCachedFiles: 2048
  • maxCacheSize: 268435456L
See Also: