mirror of
https://github.com/discourse/discourse.git
synced 2025-02-28 16:29:22 +00:00
PERF: cache service worker for 1 hour
This commit is contained in:
parent
f5e170c6b5
commit
5ad1709dba
@ -147,6 +147,10 @@ class StaticController < ApplicationController
|
||||
def service_worker_asset
|
||||
respond_to do |format|
|
||||
format.js do
|
||||
|
||||
# we take 1 hour to give a new service worker to all users
|
||||
immutable_for 1.hour
|
||||
|
||||
render(
|
||||
plain: Rails.application.assets_manifest.find_sources('service-worker.js').first,
|
||||
content_type: 'application/javascript'
|
||||
|
Loading…
x
Reference in New Issue
Block a user