ngmoco-cache-money 0.2.21 → 0.2.22

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.
@@ -55,7 +55,8 @@ module Cash
55
55
  end
56
56
 
57
57
  def ttl
58
- @ttl ||= @options[:ttl] || repository.default_ttl || 1.day
58
+ repository_ttl = repository.respond_to?(:default_ttl) ? repository.default_ttl : nil
59
+ @ttl ||= @options[:ttl] || repository_ttl || 1.day
59
60
  end
60
61
 
61
62
  def version
@@ -7,16 +7,8 @@
7
7
 
8
8
  #this wrapper lets both work.
9
9
 
10
- ####### they have MemCache installed (don't need the wrapper)
11
- if defined? MemCache
12
-
13
- Rails.logger.info("cache-money: MemCache installed") if defined? Rails
14
- #TODO add logging?
15
- class MemcachedWrapper < ::MemCache
16
- end
17
-
18
10
  ########## they have Memcached installed (do need the wrapper)
19
- elsif defined? Memcached
11
+ if defined? Memcached
20
12
  Rails.logger.info("cache-money: Memcached installed") if defined? Rails
21
13
 
22
14
  class Memcached
@@ -258,6 +250,14 @@ private
258
250
  end
259
251
 
260
252
  end
253
+ ####### they have MemCache installed (don't need the wrapper)
254
+ elsif defined? MemCache
255
+
256
+ Rails.logger.info("cache-money: MemCache installed") if defined? Rails
257
+ #TODO add logging?
258
+ class MemcachedWrapper < ::MemCache
259
+ end
260
+
261
261
  else
262
262
  Rails.logger.warn 'unable to determine memcache implementation' if defined? Rails
263
263
  end #include the wraper
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngmoco-cache-money
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 21
10
- version: 0.2.21
9
+ - 22
10
+ version: 0.2.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Kallen
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-10-05 00:00:00 -07:00
21
+ date: 2010-10-27 00:00:00 -07:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency