Skip to content

slester/browser-caching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ring.middleware.browser-caching

Middleware for ring to provide configurable cache control headers to browsers.

Usage

Add this to your Leiningen project.clj dependencies:

Clojars Project

To use, simply provide a map of filetypes with the associated number of seconds you want to send for Cache-Control: max-age=.

(ns app.core
  (:use  [ring.middleware.browser-caching])

(def app
  (wrap-browser-caching handler {"text/javascript" 360000
                                 "text/html" 0})

License

Copyright © 2015 Stephen Lester

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Provides ring middleware for browser cache hinting by file type

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published