Package net.targetr.wtm3.cache


package net.targetr.wtm3.cache
In-memory resource caching and static HTTP response generation.

ResourceCache caches resource bytes, ETags and missing-resource results with entry-count and byte-size limits. Entries are keyed by resource-loader hash code and path. Sources include classpath resources, ZIP archives and generated speed-test data through ClassPathResourceLoader, ZipFileResourceLoader and SpeedTestResourceLoader. ClassPathResourceCache provides direct access to classpath resources through a shared common cache.

ResponseCache searches an ordered collection of sources, applies source-specific headers and produces static responses for GET and HEAD requests. Content types come from Mime, and representation handling is delegated to HttpByteArrayResponse. Caching of upstream HTTP responses is provided separately by net.targetr.wtm3.net.http.proxy.cache.

Author:
Dr Michael Gardiner