maxwell_cache v0.1.0 Maxwell.Middleware.Cache

Link to this section Summary

Functions

Default hash function. Generate a key from conn to get/store response from/to cache. Can be replaced by user defined function by pass :hash_func to init/1

Make this requrest get response from cache first

Make this requrest get response from remote server and set cache

Set ttl to cache the request

Link to this section Functions

Link to this function default_hash_func(conn)

Default hash function. Generate a key from conn to get/store response from/to cache. Can be replaced by user defined function by pass :hash_func to init/1.

Link to this function from_cache(conn)

Make this requrest get response from cache first.

Link to this function from_source(conn)

Make this requrest get response from remote server and set cache.

Link to this function set_ttl(conn, ttl)

Set ttl to cache the request.