|
@@ -134,6 +134,11 @@ func (cc CachedConn) SetCache(key string, v interface{}) error {
|
|
|
return cc.cache.Set(key, v)
|
|
|
}
|
|
|
|
|
|
+// SetWithExpire sets v into cache with given key.
|
|
|
+func (cc CachedConn) SetWithExpire(key string, v interface{}, expire time.Duration) error {
|
|
|
+ return cc.cache.SetWithExpire(key, v, expire)
|
|
|
+}
|
|
|
+
|
|
|
// Transact runs given fn in transaction mode.
|
|
|
func (cc CachedConn) Transact(fn func(sqlx.Session) error) error {
|
|
|
return cc.db.Transact(fn)
|