sprockets-torquebox-cache 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ module Sprockets
5
5
  # environment.cache = Torquebox::Infinispan::Cache.new(...)
6
6
  #
7
7
  class Torquebox
8
- VERSION = "0.0.1"
8
+ VERSION = "0.0.2"
9
9
 
10
10
  def initialize(cache)
11
11
  @cache = cache
@@ -13,12 +13,13 @@ module Sprockets
13
13
 
14
14
  # Lookup value in cache
15
15
  def [](key)
16
- @cache.get path_for(key)
16
+ data = @cache.get key
17
+ Marshal.load data if data
17
18
  end
18
19
 
19
20
  # Save value to cache
20
21
  def []=(key, value)
21
- @cache.put key, value
22
+ @cache.put key, Marshal.dump(value)
22
23
  value
23
24
  end
24
25
  end
@@ -5,7 +5,7 @@ require "sprockets-torquebox-cache"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "sprockets-torquebox-cache"
7
7
  s.version = Sprockets::Cache::Torquebox::VERSION
8
- s.authors = ["Carl Hörberg"]
8
+ s.authors = ["Carl Hörberg"]
9
9
  s.email = ["carl.hoerberg@gmail.com"]
10
10
  s.homepage = ""
11
11
  s.summary = %q{A Torquebox cache store for Sprockets}
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-torquebox-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Carl Hörberg
8
+ - Carl Hörberg
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-14 00:00:00.000000000 Z
12
+ date: 2011-12-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ''
15
15
  email: