cache

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

func NewRedisConnection

func NewRedisConnection() (*RedisClient, error)

NewRedisConnection initializes a Redis connection and returns a RedisClient instance

func (*RedisClient) Close

func (r *RedisClient) Close() error

Close closes the Redis connection

func (*RedisClient) Get

func (r *RedisClient) Get(ctx context.Context, key string) (string, error)

Get retrieves a value from Redis by key

func (*RedisClient) Set

func (r *RedisClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

Set stores a key-value pair in Redis with an expiration time

Jump to

Keyboard shortcuts

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