Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Commit

Permalink
Bug fix: make sure we don't clear the buffered response when writing …
Browse files Browse the repository at this point in the history
…to the cache.

Signed-off-by: Ben Schwarz <ben.schwarz@gmail.com>
  • Loading branch information
benaskins authored and benschwarz committed Jan 21, 2009
1 parent 0b433e5 commit ae7d5df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/openuri_memcached.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.open(uri, *rest, &block)

unless response
response = openuri_original_open(uri, *rest)
Cache::set(uri.to_s, response) if Cache.enabled?
Cache::set(uri.to_s, response.clone.read) if Cache.enabled?
end

if block_given?
Expand Down

0 comments on commit ae7d5df

Please sign in to comment.