correctly invalidate course/user feature flag cache
test plan: - change a course/user feature flag - the change should stick and apply Change-Id: I2b4045bf6a0c5c57c58591c98ddcd513e8243fa0 Reviewed-on: https://gerrit.instructure.com/126202 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins Product-Review: Simon Williams <simon@instructure.com> QA-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
c1abf1dbe1
commit
ffca880b71
|
@ -52,7 +52,7 @@ class FeatureFlag < ActiveRecord::Base
|
|||
|
||||
def clear_cache
|
||||
if self.context
|
||||
self.class.connection.after_transaction_commit { MultiCache.delete(self.context.feature_flag_cache_key(feature)) }
|
||||
self.class.connection.after_transaction_commit { self.context.feature_flag_cache.delete(self.context.feature_flag_cache_key(feature)) }
|
||||
self.context.touch if Feature.definitions[feature].try(:touch_context)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,7 @@ module FeatureFlags
|
|||
end
|
||||
|
||||
def feature_flag_cache_key(feature)
|
||||
['feature_flag2', self.class.name, self.global_id, feature.to_s].cache_key
|
||||
['feature_flag3', self.class.name, self.global_id, feature.to_s].cache_key
|
||||
end
|
||||
|
||||
def feature_flag_cache
|
||||
|
|
Loading…
Reference in New Issue