From 7caa76717ed243ef6c02bdb3a9b1b2511dc79deb Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Wed, 1 Feb 2023 19:00:17 +0100 Subject: [PATCH] Set expiry of theme CSS to 3 months The `ETag` from `fresh_when` takes care of cache busting here. --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 5cf207eea..c5ca4469f 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -24,7 +24,7 @@ def show_theme theme = Theme.where(user: User.where("LOWER(screen_name) = ?", params[:username].downcase).select(:id)).first return head :no_content if theme.nil? - expires_in 1.day + expires_in 3.months return if fresh_when theme, public: true render plain: get_theme_css(theme), content_type: "text/css"