
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Use to wind down a running app when needed.
Limits the max-age to the contents of the WIND_DOWN
file, and salts the ETags to unsure clients see different deployments as having different contents.
require "rack/cache_buster"
…
use Rack::CacheBuster, APP_VERSION, WIND_DOWN_TIME
require "rack/cache_buster"
…
use Rack::CacheBuster::Rails
Add this to your deploy.rb
:
begin
gem "rack-cache-buster"
require 'rack_cache_buster_recipes'
rescue LoadError
puts "\n\n*** Please gem install rack-cache-buster before trying to deploy.\n\n"
end
# set :wind_down_time, 60*60 # defaults to 1hr
Then:
cap cache:winddown
… wait 1 hr …
cap deploy:migrations
… profit!
Find the maximum cache duration for all pages in your app, start this process with at least that amount time before you deploy.
Create a WIND_DOWN file in the app root of all your app servers.
Restart all instances (touch tmp/restart.txt will be fine for passenger apps).
Once all the caches should have expired you can deploy as normal.
If you are using Rack::Cache, you can safely put the CacheBuster below it in the stack, but only if you clear Rack::Cache's cache upon deploy.
This is actually the recommended approach as it will prevent the increased amount of hits between WIND_DOWN_TIME
and your actual deployment from making it through to your app.
FAQs
Unknown package
We found that rack-cache-buster demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.