cache

package
v0.0.0-...-07376d0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func (*Cache) GetCache

func (c *Cache) GetCache(ctx context.Context, shortUrl string) (string, error)

func (*Cache) InsertCache

func (c *Cache) InsertCache(ctx context.Context, shortUrl, longUrl string) error

type CacheInterface

type CacheInterface interface {
	InsertCache(ctx context.Context, shortUrl, longUrl string) error
	GetCache(ctx context.Context, shortUrl string) (string, error)
}

func NewCache

func NewCache(rdb *redis.Client) CacheInterface

Jump to

Keyboard shortcuts

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