Documentation ¶
Index ¶
Constants ¶
View Source
const ContextKey = "cache"
Variables ¶
This section is empty.
Functions ¶
func AddToRequest ¶
func AddToRequest(c QueryCache, fn http.HandlerFunc) http.HandlerFunc
func IsOnRequest ¶
func Middleware ¶
func Middleware(c QueryCache) mux.MiddlewareFunc
func NewMemoryCache ¶
func NewMemoryCache() memoryCache
Types ¶
type QueryCache ¶
type QueryCache interface { Save(method string, params interface{}, r interface{}) Retrieve(method string, params interface{}) interface{} Count() int // contains filtered or unexported methods }
QueryCache caches Query responses
func FromRequest ¶
func FromRequest(r *http.Request) QueryCache
Click to show internal directories.
Click to hide internal directories.