cachedao

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURLCacheDAO

func GetURLCacheDAO() *urlCacheDAO

GetURLCacheDAO 获取URL缓存DAO

@return *urlCacheDAO
@author centonhuang
@update 2024-12-05 16:06:05

Types

type URLCacheDAO

type URLCacheDAO interface {
	GetURLByShort(ctx context.Context, shortURL string) (string, error)
	GetURLByOriginal(ctx context.Context, originalURL string) (string, error)
	SetBidirectionalCache(ctx context.Context, shortURL, originalURL string, expiration time.Duration) error
	SetNilCacheByShortURL(ctx context.Context, shortURL string, expiration time.Duration) error
}

Jump to

Keyboard shortcuts

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