package
0.0.0-20220411150319-96afc83fb07a
Repository: https://github.com/chrisvdg/cacheserver.git
Documentation: pkg.go.dev

# Functions

New returns a new Cache instance backendFilePath represents the file on the filesystem where the metadata is stored minSize represents the minimum size of the body to be cached (0 caches everything).

# Constants

StateCached represents a cache entry that has been cached.
StateInit represents an initialized cache entry state.
StateInProgress represents a cache entry that is being cached.
StateInvalid represents an invalid state.
StateNoCache represents a cache entry that does not need to be cached.

# Variables

ErrEntryNotFound represents an error where a cache entry was not found.
ErrNoCache represents a request that is not cached.
ErrReadFailed represents an error where reading from proxy failed.

# Structs

Cache represents a cache instance.
Entry
Entry represents a backend entry.

# Type aliases

JSONTime is a time.Time wrapper that JSON (un)marshals into a unix timestamp.
State represents the cache state of an entry.