Skip to content

A platform for community discussion. Free, open, simple.

FIX: Update word_watcher cache key following schema change (#17755)

David Taylor381365facc17
diff --git a/app/services/word_watcher.rb b/app/services/word_watcher.rb
index 4f5b516b624..b6b136d00c5 100644
--- a/app/services/word_watcher.rb
+++ b/app/services/word_watcher.rb
@@ -2,6 +2,7 @@
class WordWatcher
REPLACEMENT_LETTER ||= CGI.unescape_html("■")
+ CACHE_VERSION = 2
def initialize(raw)
@raw = raw
@@ -105,7 +106,7 @@ class WordWatcher
end
def self.word_matcher_regexp_key(action)
- "watched-words-list:#{action}"
+ "watched-words-list:v#{CACHE_VERSION}:#{action}"
end
def self.censor(html)