https://github.com/huntsman-li/go-cache
This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql
https://github.com/huntsman-li/go-cache
cache file go go-cache ledis memcache memory mysql nodb nosql postgres postgresql
Last synced: 9 months ago
JSON representation
This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql
- Host: GitHub
- URL: https://github.com/huntsman-li/go-cache
- Owner: huntsman-li
- License: apache-2.0
- Created: 2018-02-23T03:02:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T23:21:21.000Z (almost 3 years ago)
- Last Synced: 2024-11-15T08:23:20.860Z (about 1 year ago)
- Topics: cache, file, go, go-cache, ledis, memcache, memory, mysql, nodb, nosql, postgres, postgresql
- Language: Go
- Size: 3.18 MB
- Stars: 151
- Watchers: 11
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-list - go-cache - This project encapsulates multiple db servers, redis, ledis, memcache, file, memory, nosql, postgresql (Programming Languages / Go)
README
# go-cache
This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql
example
```
package main
import (
"github.com/huntsman-li/go-cache"
_ "github.com/huntsman-li/go-cache/redis"
)
func main() {
ca, err := cache.Cacher(cache.Options{
Adapter: "redis",
AdapterConfig: "addr=127.0.0.1:6379",
OccupyMode: true,
})
if err != nil {
panic(err)
}
ca.Put("liyan", "cache", 60)
}
```