Permalink
Browse files

Base64 encode the blobs

  • Loading branch information...
1 parent 94c39cd commit 80b289a8c2d8989756467ae2d4ef6d6f8fda3ce3 @evanphx evanphx committed Sep 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/middleware/api_v1_depedencies.rb
View
4 app/middleware/api_v1_depedencies.rb
@@ -28,7 +28,7 @@ def data_for(name, ary, cache)
end
if cache
- cache.set "gem.#{name}", Marshal.dump(these)
+ cache.set "gem.#{name}", [Marshal.dump(these)].pack("m")
end
ary
@@ -55,7 +55,7 @@ def call(env)
gems.each do |g|
begin
data = cache.get "gem.#{g}"
- ary += Marshal.load(data)
+ ary += Marshal.load(data.unpack("m").first)
rescue Memcached::NotFound
begin
data_for g, ary, cache

0 comments on commit 80b289a

Please sign in to comment.