From e5565833f62b97f62ea75eba5b479963ae78b873 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 24 Sep 2018 13:07:33 +0200 Subject: Improve redundancy: add 'min_lifetime' configuration --- config/default.yaml | 8 +++++++- config/production.yaml.example | 8 +++++++- config/test.yaml | 7 +++++-- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index fa1fb628a..0d7d948c2 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -75,14 +75,20 @@ redundancy: strategies: # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'most-views' # Cache videos that have the most views # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'trending' # Cache trending videos # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views +# min_views: 10 # Having at least x views cache: previews: diff --git a/config/production.yaml.example b/config/production.yaml.example index 4d8752206..f9da8e0dd 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -76,14 +76,20 @@ redundancy: strategies: # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'most-views' # Cache videos that have the most views # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'trending' # Cache trending videos # - # size: '10GB' +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# min_lifetime: '48 hours' # strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views +# min_views: 10 # Having at least x views ############################################################################### # diff --git a/config/test.yaml b/config/test.yaml index ad94b00cd..04c999966 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -23,18 +23,21 @@ log: redundancy: videos: - check_interval: '5 seconds' + check_interval: '10 minutes' strategies: - size: '10MB' + min_lifetime: '10 minutes' strategy: 'most-views' - size: '10MB' + min_lifetime: '10 minutes' strategy: 'trending' - size: '10MB' + min_lifetime: '10 minutes' strategy: 'recently-added' - minViews: 1 + min_views: 1 cache: previews: -- cgit v1.2.3