cache 0.1.2 → 0.1.3

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.
data/lib/cache.rb CHANGED
@@ -5,6 +5,8 @@ class Cache
5
5
 
6
6
  # Create a new Cache object by passing it a client of your choice.
7
7
  #
8
+ # Defaults to an in-process memory store, but you probably don't want that.
9
+ #
8
10
  # Supported memcached clients:
9
11
  # * memcached[https://github.com/fauna/memcached] (either a Memcached or a Memcached::Rails)
10
12
  # * dalli[https://github.com/mperham/dalli] (either a Dalli::Client or an ActiveSupport::Cache::DalliStore)
data/lib/cache/storage.rb CHANGED
@@ -28,6 +28,7 @@ class Cache
28
28
 
29
29
  def set(k, v, ttl)
30
30
  ttl ||= parent.config.default_ttl
31
+ ttl = ttl.to_i
31
32
  reset_if_forked_or_threaded
32
33
  if memcached? or dalli? or memcached_rails? or mem_cache?
33
34
  bare_client.set k, v, ttl
data/lib/cache/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Cache
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-24 00:00:00 -06:00
18
+ date: 2011-03-01 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency