Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Add Cache-Control header to your Sinatra static assets
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib 0.0.3
.gitignore initial commit
Gemfile initial commit
Gemfile.lock initial commit
README.md change default to 86400
sinatra-cache-assets.gemspec initial commit

README.md

Sinatra::CacheAssets

This Rack middleware will add a Cache-Control header to your Sinatra static assets

Usage

require "sinatra"
require "sinatra/cache_assets"

use Sinatra::CacheAssets, :max_age => 7200  # seconds, defaults to 86400

get "/" do
  "some data"
end

License

MIT

Something went wrong with that request. Please try again.