sprockets-torquebox-cache 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ require 'base64'
1
2
  module Sprockets
2
3
  module Cache
3
4
  # Utilites Torquebox Infinispan Cache for Sprocket caching
@@ -5,7 +6,7 @@ module Sprockets
5
6
  # environment.cache = Torquebox::Infinispan::Cache.new(...)
6
7
  #
7
8
  class Torquebox
8
- VERSION = "0.0.2"
9
+ VERSION = "0.0.3"
9
10
 
10
11
  def initialize(cache)
11
12
  @cache = cache
@@ -14,12 +15,12 @@ module Sprockets
14
15
  # Lookup value in cache
15
16
  def [](key)
16
17
  data = @cache.get key
17
- Marshal.load data if data
18
+ Marshal.load Base64.decode64(data) if data
18
19
  end
19
20
 
20
21
  # Save value to cache
21
22
  def []=(key, value)
22
- @cache.put key, Marshal.dump(value)
23
+ @cache.put key, Base64.encode64(Marshal.dump(value))
23
24
  value
24
25
  end
25
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-torquebox-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-15 00:00:00.000000000 Z
12
+ date: 2011-12-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ''
15
15
  email: