libmemcached_store 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.2
4
+ * Add :hit to the #fetch payload
5
+
3
6
  ## 0.6.1
4
7
  * Subclass Memcached instead of modifying the instance (staugaard)
5
8
 
@@ -74,8 +74,12 @@ module ActiveSupport
74
74
  key = expanded_key(key)
75
75
  unless options && options[:force]
76
76
  entry = instrument(:read, key, options) do |payload|
77
- payload[:super_operation] = :fetch if payload
78
- read_entry(key, options)
77
+ read_entry(key, options).tap do |result|
78
+ if payload
79
+ payload[:super_operation] = :fetch
80
+ payload[:hit] = !!result
81
+ end
82
+ end
79
83
  end
80
84
  end
81
85
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LibmemcachedStore
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libmemcached_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-06-09 00:00:00.000000000 Z
14
+ date: 2013-06-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: memcached
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 1.8.24
164
+ rubygems_version: 1.8.21
165
165
  signing_key:
166
166
  specification_version: 3
167
167
  summary: ActiveSupport 3+ cache store for the C-based libmemcached client