Skip to content

Commit

Permalink
Merge pull request senchalabs#512 from matthiasdg/staticcache
Browse files Browse the repository at this point in the history
staticCache: don't cache responses containing a content-range / partial content
  • Loading branch information
tj committed Mar 23, 2012
2 parents d0402cf + 35447cd commit 3aa75b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/middleware/staticCache.js
Expand Up @@ -81,6 +81,9 @@ module.exports = function staticCache(options){
// ignore larger files
if (!contentLength || contentLength > maxlen) return;

//don't cache partial files
if (headers['content-range']) return;

// dont cache items we shouldn't be
// TODO: real support for must-revalidate / no-cache
if ( cc['no-cache']
Expand Down

0 comments on commit 3aa75b6

Please sign in to comment.