feat(disk-cache): rewrite diskcache backend to be k8s and NFS safe.
- no longer depend on diskcache - use simpler version with Redis lock, and filesystem storage - fixes RCCE-78
This commit is contained in:
parent
0eaacd34a0
commit
39bed20bcb
11 changed files with 463 additions and 131 deletions
|
|
@ -296,14 +296,24 @@ file_store.storage_path = /var/opt/rhodecode_data/file_store
|
|||
; the repository. This path is important to be shared across filesystems and with
|
||||
; RhodeCode and vcsserver
|
||||
|
||||
; Redis url to acquire/check generation of archives locks
|
||||
archive_cache.locking.url = redis://redis:6379/1
|
||||
|
||||
; Storage backend, only 'filesystem' is available now
|
||||
archive_cache.backend.type = filesystem
|
||||
|
||||
; Default is $cache_dir/archive_cache if not set
|
||||
archive_cache.store_dir = /var/opt/rhodecode_data/tarballcache
|
||||
archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache
|
||||
|
||||
; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb
|
||||
archive_cache.cache_size_gb = 10
|
||||
archive_cache.filesystem.cache_size_gb = 1
|
||||
|
||||
; Eviction policy used to clear out after cache_size_gb limit is reached
|
||||
archive_cache.filesystem.eviction_policy = least-recently-stored
|
||||
|
||||
; By default cache uses sharding technique, this specifies how many shards are there
|
||||
archive_cache.cache_shards = 4
|
||||
archive_cache.filesystem.cache_shards = 8
|
||||
|
||||
|
||||
; #############
|
||||
; CELERY CONFIG
|
||||
|
|
|
|||
|
|
@ -264,14 +264,24 @@ file_store.storage_path = /var/opt/rhodecode_data/file_store
|
|||
; the repository. This path is important to be shared across filesystems and with
|
||||
; RhodeCode and vcsserver
|
||||
|
||||
; Redis url to acquire/check generation of archives locks
|
||||
archive_cache.locking.url = redis://redis:6379/1
|
||||
|
||||
; Storage backend, only 'filesystem' is available now
|
||||
archive_cache.backend.type = filesystem
|
||||
|
||||
; Default is $cache_dir/archive_cache if not set
|
||||
archive_cache.store_dir = /var/opt/rhodecode_data/tarballcache
|
||||
archive_cache.filesystem.store_dir = /var/opt/rhodecode_data/archive_cache
|
||||
|
||||
; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb
|
||||
archive_cache.cache_size_gb = 40
|
||||
archive_cache.filesystem.cache_size_gb = 40
|
||||
|
||||
; Eviction policy used to clear out after cache_size_gb limit is reached
|
||||
archive_cache.filesystem.eviction_policy = least-recently-stored
|
||||
|
||||
; By default cache uses sharding technique, this specifies how many shards are there
|
||||
archive_cache.cache_shards = 4
|
||||
archive_cache.filesystem.cache_shards = 8
|
||||
|
||||
|
||||
; #############
|
||||
; CELERY CONFIG
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue