Documentation
¶
Overview ¶
Package queryercache provides cache for paginator Queryer interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheMetrics ¶
CacheMetrics specify interface for metrics methods.
type Option ¶
type Option func(opt *options)
Option specify option for QueryerCache.
func WithCountTTL ¶
QueryerCache count cache ttl (default 30 seconds).
func WithMetrics ¶
func WithMetrics(m CacheMetrics) Option
WithMetrics metrics provider for QueryerCache (default noop impl).
func WithQueryTTL ¶
WithQueryTTL query cache ttl (default 30 seconds).
type QueryerCache ¶
type QueryerCache[T any] struct { // contains filtered or unexported fields }
QueryerCache implementing cache for paginator.Queryer interface.
func New ¶
func New[T any](queryer paginator.Queryer[T], opts ...Option) *QueryerCache[T]
New conscturcts new QueryerCache.
Click to show internal directories.
Click to hide internal directories.