diff --git a/app/controllers/async_info_controller.rb b/app/controllers/async_info_controller.rb index 33faf03e2..566dbec57 100644 --- a/app/controllers/async_info_controller.rb +++ b/app/controllers/async_info_controller.rb @@ -35,7 +35,7 @@ class AsyncInfoController < ApplicationController set_surrogate_key_header "shell-version-endpoint" # shell_version will change on every deploy. # *Technically* could be only on changes to assets and shell, but this is more fool-proof. - shell_version = ApplicationConfig["HEROKU_SLUG_COMMIT"] + shell_version = ApplicationConfig["RELEASE_FOOTPRINT"] render json: { version: Rails.env.production? ? shell_version : rand(1000) }.to_json end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dc0de3659..d1e81ea2d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -180,11 +180,11 @@ module ApplicationHelper "#{community_name} Community" end - def cache_key_heroku_slug(path) - heroku_slug_commit = ApplicationConfig["HEROKU_SLUG_COMMIT"] - return path if heroku_slug_commit.blank? + def release_adjusted_cache_key(path) + release_footprint = ApplicationConfig["RELEASE_FOOTPRINT"] + return path if release_footprint.blank? - "#{path}-#{heroku_slug_commit}" + "#{path}-#{release_footprint}" end def copyright_notice diff --git a/app/views/articles/_sidebar.html.erb b/app/views/articles/_sidebar.html.erb index 5ec19c340..88c9b13da 100644 --- a/app/views/articles/_sidebar.html.erb +++ b/app/views/articles/_sidebar.html.erb @@ -1,7 +1,7 @@
<% end %> - <% cache(cache_key_heroku_slug("main-article-right-sidebar-discussions-#{params[:timeframe]}"), expires_in: (params[:timeframe].blank? ? 120 : 360).seconds) do %> + <% cache(release_adjusted_cache_key("main-article-right-sidebar-discussions-#{params[:timeframe]}"), expires_in: (params[:timeframe].blank? ? 120 : 360).seconds) do %> <% @sidebar_ad = DisplayAd.for_display("sidebar_right") %> <% if @sidebar_ad %>