Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

You can now cache paths that don't point to files (e.g. that point to…

… Rails actions or directories).
  • Loading branch information...
commit aec0de889c034796fb87cffb893a86626b707d9d 1 parent 112cffd
@arsduo arsduo authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/rack/offline.rb
View
3  lib/rack/offline.rb
@@ -73,7 +73,8 @@ def call(env)
def precache_key!
hash = @config.cache.map do |item|
- Digest::SHA2.hexdigest(@root.join(item).read)
+ path = @root.join(item)
+ Digest::SHA2.hexdigest(path.read) if File.file?(path)
end
@key = Digest::SHA2.hexdigest(hash.join)
Please sign in to comment.
Something went wrong with that request. Please try again.