Documentation ¶
Overview ¶
package fcache provides caching middleware for the Fiber web framework. The caching engine can be accessed through the Cache variable.
Index ¶
Constants ¶
const ( AutoGenerateKey = "" NoExpiration = gc.NoExpiration )
Variables ¶
var ( Cache *gc.Cache Config internalConfig )
Functions ¶
func New ¶
New returns a new instance of the caching middleware, with an automatically generated key and the default TTL.
func NewWithKey ¶
NewWithKey returns a new instance of the caching middleware with the default TTL and the option to set your own cache key. If this is an empty string or AutoGenerateKey, a key will be automatically generated.
func NewWithTTL ¶
NewWithTTL returns a new instance of the caching middleware with the option to define your own cache key and your own TTL. If the cache key you set is an empty string or AutoGenerateKey, a key will be automatically generated.
Types ¶
This section is empty.