beego redis 自定义
threeperson博客开发中也是用到了缓存的,翻看了一下beego的代码,发现是包含cache模块的。自行封装了一个redis实现,增加了独立的hset和hget函数。
####redis struct
```
package caches
import (
"github.com/astaxie/beego/cache"
"github.com/garyburd/redigo/redis"
"encoding/json"
"errors"
"strconv"
"time"
)
var (
// the collection name of
2717
1
0
1年前