gorediscache

package module
v0.0.0-...-b519675 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 2 Imported by: 1

README

gorediscache

Go redis cache.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	DefaultTTL time.Duration
	// contains filtered or unexported fields
}

func NewCache

func NewCache(redisUrl string, defaultTTL time.Duration) *Cache

func (*Cache) Close

func (this *Cache) Close() error

func (*Cache) Delete

func (this *Cache) Delete(keys ...any) error

func (*Cache) GetMap

func (this *Cache) GetMap(key string) (map[string]string, error)

func (*Cache) GetString

func (this *Cache) GetString(key string) (string, error)

func (*Cache) SetMap

func (this *Cache) SetMap(key string, value map[string]string, ttl time.Duration) error

func (*Cache) SetString

func (this *Cache) SetString(key string, value any, ttl time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL