From 985fff708845c731be84ca55f25b8e01dbcf4d79 Mon Sep 17 00:00:00 2001 From: steveb Date: Wed, 24 Aug 2022 11:07:54 +0200 Subject: [PATCH] feat(scopes): users can now specify the expiration delay of their cache --- app/services/forest_liana/scope_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/forest_liana/scope_manager.rb b/app/services/forest_liana/scope_manager.rb index 8d6d3f87..def47764 100644 --- a/app/services/forest_liana/scope_manager.rb +++ b/app/services/forest_liana/scope_manager.rb @@ -2,7 +2,7 @@ module ForestLiana class ScopeManager @@scopes_cache = Hash.new # 5 minutes exipration cache - @@scope_cache_expiration_delta = 300 + @@scope_cache_expiration_delta = ENV['SCOPE_CACHE_EXPIRATION_DELTA'] || 300 def self.apply_scopes_on_records(records, forest_user, collection_name, timezone) scope_filters = get_scope_for_user(forest_user, collection_name, as_string: true)