cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

Functions

func GetCache

func GetCache(ctx context.Context, key string) (string, error)

func InitRedisClient

func InitRedisClient(redisAddr string)

func InitializeCache

func InitializeCache(addr, password string, db int)

func RateLimiter

func RateLimiter(maxRequests int, window time.Duration) gin.HandlerFunc

func SetCache

func SetCache(ctx context.Context, key string, value interface{}, ttl int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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