Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

ddollar/sinatra-cache-assets

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

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

About

Add Cache-Control header to your Sinatra static assets

Resources

Stars

Watchers

Forks

Packages

No packages published