mirror of
https://github.com/astaxie/beego.git
synced 2025-07-10 11:00:19 +00:00
fix #1530
This commit is contained in:
4
cache/redis/redis.go
vendored
4
cache/redis/redis.go
vendored
@ -109,9 +109,9 @@ ERROR:
|
||||
}
|
||||
|
||||
// Put put cache to redis.
|
||||
func (rc *Cache) Put(key string, val interface{}, timeout int64) error {
|
||||
func (rc *Cache) Put(key string, val interface{}, timeout time.Duration) error {
|
||||
var err error
|
||||
if _, err = rc.do("SETEX", key, timeout, val); err != nil {
|
||||
if _, err = rc.do("SETEX", key, int64(timeout.Seconds()), val); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user