Class ValidatingCachingHttpContentFactory

java.lang.Object
org.eclipse.jetty.http.content.CachingHttpContentFactory
org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory
All Implemented Interfaces:
Runnable, HttpContent.Factory

public class ValidatingCachingHttpContentFactory extends CachingHttpContentFactory implements Runnable

HttpContent.Factory implementation of CachingHttpContentFactory which evicts invalid entries from the cache. Uses a validationTime parameter to check files when they are accessed and/or sweepDelay parameter for a periodic sweep for invalid entries in the cache.

HttpContent validation checks are configured through the validationTime parameter in the constructor. If an HttpContent is found to be invalid it will be removed from the cache. A value of -1 means that the cached HttpContent will never be checked if it is still valid, a value of 0 means it is checked on every request, a positive value indicates the number of milliseconds of the minimum time between validation checks.

This also remember a missed entry for the time set by validationTimems. After this has elapsed the entry will be invalid and will be evicted from the cache at the next access.