Class CachingHttpContentFactory

java.lang.Object
org.eclipse.jetty.http.content.CachingHttpContentFactory
All Implemented Interfaces:
HttpContent.Factory
Direct Known Subclasses:
ValidatingCachingHttpContentFactory

public class CachingHttpContentFactory extends Object 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 behaviours 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: