summaryrefslogtreecommitdiffstats
path: root/modules/cache/cache_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-12-19 17:29:05 +0800
committerGitHub <noreply@github.com>2023-12-19 09:29:05 +0000
commite7cb8da2a8310ac167b6f613b283caa3316a7154 (patch)
tree2548aa41a4b8c168b4cc81d5cb63d577c9a2ca8b /modules/cache/cache_test.go
parent4eb2a29910779ac6005a5d67f31067a1132c5297 (diff)
downloadgitea-e7cb8da2a8310ac167b6f613b283caa3316a7154.tar.gz
gitea-e7cb8da2a8310ac167b6f613b283caa3316a7154.zip
Always enable caches (#28527)
Nowadays, cache will be used on almost everywhere of Gitea and it cannot be disabled, otherwise some features will become unaviable. Then I think we can just remove the option for cache enable. That means cache cannot be disabled. But of course, we can still use cache configuration to set how should Gitea use the cache.
Diffstat (limited to 'modules/cache/cache_test.go')
-rw-r--r--modules/cache/cache_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/cache/cache_test.go b/modules/cache/cache_test.go
index cf464af392..3f65040924 100644
--- a/modules/cache/cache_test.go
+++ b/modules/cache/cache_test.go
@@ -22,9 +22,9 @@ func createTestCache() {
}
func TestNewContext(t *testing.T) {
- assert.NoError(t, NewContext())
+ assert.NoError(t, Init())
- setting.CacheService.Cache = setting.Cache{Enabled: true, Adapter: "redis", Conn: "some random string"}
+ setting.CacheService.Cache = setting.Cache{Adapter: "redis", Conn: "some random string"}
con, err := newCache(setting.Cache{
Adapter: "rand",
Conn: "false conf",