feat(kv): persist cache and session into disk before shutdown

This commit is contained in:
Aaron Liu
2023-04-16 09:17:06 +08:00
parent 4d131db504
commit b9d9e036c9
12 changed files with 347 additions and 57 deletions

View File

@@ -5,7 +5,6 @@ import (
"net/http/httptest"
"testing"
"github.com/cloudreve/Cloudreve/v3/pkg/conf"
"github.com/cloudreve/Cloudreve/v3/pkg/util"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
@@ -20,14 +19,6 @@ func TestSession(t *testing.T) {
asserts.NotNil(Store)
asserts.IsType(emptyFunc(), handler)
}
{
conf.RedisConfig.Server = "123"
asserts.Panics(func() {
Session("2333")
})
conf.RedisConfig.Server = ""
}
}
func emptyFunc() gin.HandlerFunc {