Skip to content

Commit

Permalink
Don't cache specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed May 1, 2011
1 parent e197f5e commit 7bc1f38
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rubygems_proxy.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7bc1f38

Please sign in to comment.