Skip to content

Commit 2f45983

Browse files
committed
add redis as cache
1 parent 694911d commit 2f45983

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cache/cache.go

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ type Cache interface {
1818

1919
var conn Cache
2020

21+
func init() {
22+
// initially set cache to memory unless explicitly defined in the Init function below
23+
conn = newMemoryCache()
24+
}
25+
2126
// NewCache ...
2227
func Init(driver CacheDriver, url ...string) {
2328
switch driver {

0 commit comments

Comments
 (0)