mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
cache/filecache: Add a filecache root dir
This is just a safe guard to make sure we don't evict/remove files that do not belong to the cache.
This commit is contained in:
2
cache/filecache/filecache_config_test.go
vendored
2
cache/filecache/filecache_config_test.go
vendored
@@ -33,6 +33,7 @@ func TestDecodeConfig(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
|
||||
configStr := `
|
||||
resourceDir = "myresources"
|
||||
[caches]
|
||||
[caches.getJSON]
|
||||
maxAge = "10m"
|
||||
@@ -72,6 +73,7 @@ func TestDecodeConfigIgnoreCache(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
|
||||
configStr := `
|
||||
resourceDir = "myresources"
|
||||
ignoreCache = true
|
||||
[caches]
|
||||
[caches.getJSON]
|
||||
|
Reference in New Issue
Block a user