package
0.0.0-20240815033427-265ede93ef62
Repository: https://github.com/bellis-daemon/bellis.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
Cache user must pass getCacheKey to describe the way to generate cache key.
CacheByRequestPath a shortcut function for caching response by url path, means will discard the query params.
CacheByRequestURI a shortcut function for caching response by uri.
No description provided by the author
IgnoreQueryOrder will ignore the queries order in url when generate cache key .
WithBeforeReplyWithCache will be called before replying with cache.
WithCacheStrategyByRequest set up the custom strategy by per request.
No description provided by the author
WithLogger set the custom logger.
WithOnHitCache will be called when cache hit.
WithOnMissCache will be called when cache miss.
WithOnShareSingleFlight will be called when share the singleflight result.
No description provided by the author
WithPrefixKey will prefix the key.
WithSingleFlightForgetTimeout to reduce the impact of long tail requests.
# Structs
Config contains all options.
Discard the default logger that will discard all logs of gin-cache.
ResponseCache record the http response cache.
Strategy the cache strategy.
# Interfaces
Logger define the logger interface.
# Type aliases
No description provided by the author
GetCacheStrategyByRequest User can this function to design custom cache strategy by request.
OnHitCacheCallback define the callback when use cache.
OnMissCacheCallback define the callback when use cache.
OnShareSingleFlightCallback define the callback when share the singleflight result.
Option represents the optional function.