Documentation
¶
Index ¶
- func New[K comparable, V any](client ClientInterface, loader dataloader.Loader[K, V], ...) *redisDataLoader[K, V]
- func WithExpiration(expiration time.Duration) func(*option)
- func WithKeyFunc(keyFunc func(any) string) func(*option)
- func WithMarshalFunc(marshalFunc func(any) ([]byte, error)) func(*option)
- func WithUnmarshalFunc(unmarshalFunc func([]byte, any) error) func(*option)
- type ClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New[K comparable, V any](client ClientInterface, loader dataloader.Loader[K, V], options ...func(*option)) *redisDataLoader[K, V]
New creates a new RedisDataLoader
func WithExpiration ¶
WithExpiration sets the expiration time for the cache
func WithKeyFunc ¶
WithKeyFunc sets the key function for the cache
func WithMarshalFunc ¶
WithMarshalFunc sets the marshal function for the cache
func WithUnmarshalFunc ¶
WithUnmarshalFunc sets the unmarshal function for the cache
Types ¶
Click to show internal directories.
Click to hide internal directories.