cache

package
v0.0.0-...-d8ff57e Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

func GetCacheConnect

func GetCacheConnect() redis.UniversalClient

GetCacheConnect get redis connection. Created by initializing configuration parameters.

To ensure high availability, data read and write have timeout limits.

Query errors may not necessarily be caused by the queries (e.g. no connections in the connection pool).

func InitRedisClient

func InitRedisClient(c *config.Redis, clientPrefix string) error

InitRedisClient initialize redis connection based on config.

Enabling cache should trigger an update to the Redis cache for each resource operation, updating the DB first and then Redis.

All Key of Redis have a default expiration time of 1 hour and are maintained and updated by goroutine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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