Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("item not found") ErrExpired = errors.New("item found but expired") )
common errors
View Source
var Cacheable = []int{ http.StatusOK, http.StatusNonAuthoritativeInfo, http.StatusNoContent, http.StatusPartialContent, http.StatusMultipleChoices, http.StatusMovedPermanently, http.StatusNotFound, http.StatusMethodNotAllowed, http.StatusGone, http.StatusRequestURITooLong, http.StatusNotImplemented, }
Cacheable contains the HTTP status codes are defined as cacheable. -> https://stackoverflow.com/a/39406969
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func New ¶
func New(adapters ...InitAdapter) (*Cache, error)
New initializes a new cache with the adapters that are passed in.
type InitAdapter ¶
Click to show internal directories.
Click to hide internal directories.