Skip to content

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

DEV: Key the Theme `DistributedCache` on `BASE_COMPILER_VERSION` (#17495)

David Taylor92e8a6d62b23
diff --git a/app/models/theme.rb b/app/models/theme.rb
index 6488b36e52d..d82b5bd8486 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -6,9 +6,11 @@ require 'json_schemer'
class Theme < ActiveRecord::Base
include GlobalPath
+ BASE_COMPILER_VERSION = 56
+
attr_accessor :child_components
- @cache = DistributedCache.new('theme')
+ @cache = DistributedCache.new("theme:compiler#{BASE_COMPILER_VERSION}")
belongs_to :user
belongs_to :color_scheme
@@ -154,7 +156,6 @@ class Theme < ActiveRecord::Base
SvgSprite.expire_cache
end
- BASE_COMPILER_VERSION = 56
def self.compiler_version
get_set_cache "compiler_version" do
dependencies = [