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: 2 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T23:21:21.000Z (about 2 years ago)
- Last Synced: 2024-11-15T08:23:20.860Z (6 months 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
README
# go-cache
This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresqlexample
```
package mainimport (
"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)
}
```