cache

package
v0.0.0-...-3a65944 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCache

func GetCache(ctx context.Context, key string, obj interface{}) error

*

  • Get data in cache with key
  • Save data to obj use pointer

func SetCache

func SetCache(
	ctx context.Context,
	key string,
	data interface{},
	ttl int64,
	distributedCache service.IRedisCache,
	localCache service.ILocalCache,
) (res string, ok bool)

*

  • Set cache - set distributed cache and local cache
  • @param ctx
  • @param key
  • @param data
  • @param ttl
  • @param distributedCache
  • @param localCache
  • @return bool, error

Types

This section is empty.

Jump to

Keyboard shortcuts

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