Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add Cache-Control header to your Sinatra static assets

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 sinatra-cache-assets.gemspec
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.