From 25d56fad6e477ba4c00438e0a8a5d4a899e8f0f3 Mon Sep 17 00:00:00 2001 From: topjohncian <45138629+topjohncian@users.noreply.github.com> Date: Tue, 14 Jun 2022 14:42:02 +0800 Subject: [PATCH] Fix: admin summary cannot be cached in redis (#1329) --- service/admin/site.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/admin/site.go b/service/admin/site.go index e3c2350..12bee1f 100644 --- a/service/admin/site.go +++ b/service/admin/site.go @@ -1,6 +1,7 @@ package admin import ( + "encoding/gob" "time" model "github.com/cloudreve/Cloudreve/v3/models" @@ -10,6 +11,11 @@ import ( "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) +func init() { + gob.Register(map[string]interface{}{}) + gob.Register(map[string]string{}) +} + // NoParamService 无需参数的服务 type NoParamService struct { }