Skip to content
Snippets Groups Projects

Broadcast message stale cache on different Gitlab revisions

All threads resolved!
Compare and Show latest version
2 files
+ 11
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 9
0
@@ -50,6 +50,14 @@ def read(key, klass = nil)
def write(key, value, options = nil)
value = { single_strategy_key_component => value } if @nested_key
# need to handle some sort of 'append write' when fetch calls this
# else the writes will key removing each revision's other's cache entries
# value = if @nested_key
# binding.pry
# existing_value = read(key, BroadcastMessage) || {}
# existing_value[single_strategy_key_component] = value
# end
backend.write(cache_key(key), value.to_json, options)
end
@@ -70,6 +78,7 @@ def fetch(key, options = {}, &block)
def parse_value(raw, klass)
value = Gitlab::Json.parse(raw.to_s)
# binding.pry if @nested_key
value = value[single_strategy_key_component] if @nested_key
case value
Loading