cache

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCache

func DeleteCache(key string)

* * DeleteCache - Delete key value * @params key string * @return error *

func Get

func Get(key, def string) string

* * Get - Get key value * @params key, def string * @return et.KeyValue *

func InitEvents

func InitEvents()

func Set

func Set(key string, value string, expiration time.Duration) string

* * Set - Set key value * @params key string, value string, expiration time.Duration * @return error *

Types

type Cache

type Cache struct {
	Id     string            `json:"id"`
	Values map[string]string `json:"_"`
	// contains filtered or unexported fields
}

func (*Cache) Delete

func (s *Cache) Delete(key string)

* * Delete * @param key string *

func (*Cache) Get

func (s *Cache) Get(key, def string) (string, bool)

* * Get * @param key string * @return string, bool *

func (*Cache) Set

func (s *Cache) Set(key, value string, expiration time.Duration) string

* * Set * @param key, value string, expiration time.Duration * @return string *

func (*Cache) SetDB

func (s *Cache) SetDB(db *jdb.DB)

* * SetDB * @param db *jdb.DB *

Jump to

Keyboard shortcuts

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