cachetastic 3.0.4 → 3.0.5

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.
@@ -82,7 +82,7 @@ module Cachetastic # :nodoc:
82
82
  end
83
83
 
84
84
  def ns_connection
85
- unless @_ns_connection
85
+ if !@_ns_connection || !@_ns_connection.active?
86
86
  @_ns_connection = MemCache.new(self.servers, self.mc_options.merge(:namespace => :namespace_versions))
87
87
  end
88
88
  @_ns_connection
@@ -168,7 +168,7 @@ module Cachetastic # :nodoc:
168
168
  end
169
169
 
170
170
  def retryable(options = {}, &block)
171
- opts = { :tries => 2, :on => Exception }.merge(options)
171
+ opts = { :tries => 3, :on => Exception }.merge(options)
172
172
 
173
173
  retries = opts[:tries]
174
174
  retry_exceptions = [opts[:on]].flatten
@@ -179,11 +179,12 @@ module Cachetastic # :nodoc:
179
179
  rescue #{retry_exceptions.join(", ")} => e
180
180
  retries -= 1
181
181
  if retries > 0
182
+ clear_adapter!
182
183
  retry
183
184
  else
184
185
  raise e
185
186
  end
186
- end
187
+ end
187
188
  }
188
189
 
189
190
  eval(x, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cachetastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-31 00:00:00 -04:00
12
+ date: 2009-10-01 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements: []
89
89
 
90
90
  rubyforge_project: magrathea
91
- rubygems_version: 1.3.4
91
+ rubygems_version: 1.3.5
92
92
  signing_key:
93
93
  specification_version: 3
94
94
  summary: A very simple, yet very powerful caching framework for Ruby.