Skip to content

skorolevskiy/go-begginer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple cache module for GO

Simple cache module for Go Lang

Create new cache storage

cache.New()

Add new item to cache

cache.Set(key string, value interfece{}, ttl time.Duration)
Example:
cache.Set("userId", 42, time.Second*5)

Get item from cache storage

cache.Get(key string) (interface{}, error)
Example:
userId, err := cache.Get("userId")

Delete item from cache storage

cache.Delete(key string) error
Example:
err := cache.Delete("userId")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages