From 77ded197427d41f4dbb5c5d55f68e8270d136044 Mon Sep 17 00:00:00 2001 From: hoteas Date: Mon, 24 May 2021 06:16:32 +0800 Subject: [PATCH] move redis code to package hotime --- cache/cache_redis.go => cache_redis.go | 3 +-- example/main.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename cache/cache_redis.go => cache_redis.go (98%) diff --git a/cache/cache_redis.go b/cache_redis.go similarity index 98% rename from cache/cache_redis.go rename to cache_redis.go index 717a4d9..2371367 100644 --- a/cache/cache_redis.go +++ b/cache_redis.go @@ -1,7 +1,6 @@ -package cache +package hotime import ( - . "../../hotime" "github.com/garyburd/redigo/redis" "strings" "time" diff --git a/example/main.go b/example/main.go index da8bafd..a107148 100644 --- a/example/main.go +++ b/example/main.go @@ -24,7 +24,7 @@ func main() { //手动模式, appIns.SetConfig("example/config/config.json") //redis缓存接入 - //ca:=hotime.CacheIns(&cache.CacheRedis{Host:appIns.Config.GetString("redisHost"),Pwd:appIns.Config.GetString("redisPwd"),Time:appIns.Config.GetCeilInt64("cacheLongTime")}) + //ca:=hotime.CacheIns(&hotime.CacheRedis{Host:appIns.Config.GetString("redisHost"),Pwd:appIns.Config.GetString("redisPwd"),Time:appIns.Config.GetCeilInt64("cacheLongTime")}) //ca.Cache("xyzm","dasdas") //ca.Cache("xyzn","dasdas") //ca.Cache("xyzo","dasdas")