Skip to content
Browse files

Don't cache specs.

  • Loading branch information...
1 parent e197f5e commit 7bc1f389ff2119e6541a02264056e93254a158dd @fnando fnando committed May 1, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 rubygems_proxy.rb
View
6 rubygems_proxy.rb
@@ -32,7 +32,7 @@ def cache_dir
end
def contents
- if cached? && valid?
+ if cached? && !specs?
logger.info "Read from cache: #{filepath}"
open(filepath).read
else
@@ -52,10 +52,6 @@ def save(contents)
File.open(filepath, "wb") {|handler| handler << contents}
end
- def valid?
- specs? ? Time.now - File.mtime(filepath) < 300 : true
- end
-
def specs?
env["PATH_INFO"] =~ /specs\..+\.gz$/
end

0 comments on commit 7bc1f38

Please sign in to comment.
Something went wrong with that request. Please try again.