Versions in this module Expand all Collapse all v1 v1.0.0 Nov 4, 2019 Changes in this version + const ReasonRequestAuthorizationHeader + const ReasonRequestMethodCONNECT + const ReasonRequestMethodDELETE + const ReasonRequestMethodOPTIONS + const ReasonRequestMethodPOST + const ReasonRequestMethodPUT + const ReasonRequestMethodTRACE + const ReasonRequestMethodUnkown + const ReasonRequestNoStore + const ReasonResponseNoStore + const ReasonResponsePrivate + const ReasonResponseUncachableByDefault + var DefaultCacheStrategy = NewCacheStrategyWithDefault() + var DefaultIncludeHeaders = []string + type Cache struct + func NewCache(name string, maxEntries int, maxSizeMB int, maxAge time.Duration) *Cache + func (c *Cache) Get(key string) (interface{}, bool) + func (c *Cache) Invalidate() + func (c *Cache) Len() int + func (c *Cache) LogEvery(d time.Duration) + func (c *Cache) PurgeEntries(keys []string) + func (c *Cache) PurgeOldEntries() + func (c *Cache) PurgedKeysAsString(keys []string) string + func (c *Cache) Set(key string, label string, sizeBytes int, cacheObject interface{}) + func (c *Cache) SizeByte() int + type CacheEntry struct + type CacheStrategy struct + func NewCacheStrategy(includeHeaders []string, includeCookies []string, ...) *CacheStrategy + func NewCacheStrategyWithDefault() *CacheStrategy + func (tcs *CacheStrategy) Hash(method string, url string, requestHeader http.Header) string + func (tcs *CacheStrategy) HashWithParameters(method string, url string, requestHeader http.Header, includeHeaders []string, ...) string + func (tcs *CacheStrategy) IsCacheable(method string, url string, statusCode int, requestHeader http.Header, ...) bool Other modules containing this package github.com/tarent/lib-compose/v2