cachy 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cachy.rb +1 -1
- data/lib/cachy/redis_wrapper.rb +2 -2
- data/lib/cachy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a1cbe0834a307129a7e417f75ec08f6e29ef92b
|
4
|
+
data.tar.gz: 410074f6abdbbbb45a9cca1c68c4eb434284bae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a263aa42c5c6ef4cd48db8fd8ec8561e80fb16d6582a4d1fbec9f0d911909591f39572bcd8afb0f808d9b34345b69e601218a417764e0a9dd01f8607dcb4ed2d
|
7
|
+
data.tar.gz: 0ac5bacd70d10723ad1d401022a01a7c4f9e20c339140856a344f15733de998a55782d7f0b85fe33f4af724bc2961107ec07b807f544dc0345e4094ed14168a5
|
data/lib/cachy.rb
CHANGED
@@ -156,7 +156,7 @@ module Cachy
|
|
156
156
|
def self.wrap_cache(cache)
|
157
157
|
if cache.respond_to? :read and cache.respond_to? :write
|
158
158
|
cache
|
159
|
-
elsif cache.class.to_s
|
159
|
+
elsif cache.class.to_s =~ /^Redis/
|
160
160
|
require 'cachy/redis_wrapper'
|
161
161
|
RedisWrapper.new(cache)
|
162
162
|
elsif cache.respond_to? :get and cache.respond_to? :set
|
data/lib/cachy/redis_wrapper.rb
CHANGED
@@ -3,7 +3,7 @@ require 'yaml'
|
|
3
3
|
|
4
4
|
class Cachy::RedisWrapper < Cachy::Wrapper
|
5
5
|
def read(key)
|
6
|
-
result = @wrapped
|
6
|
+
result = @wrapped.get(key)
|
7
7
|
return if result.nil?
|
8
8
|
YAML.load(result)
|
9
9
|
end
|
@@ -17,4 +17,4 @@ class Cachy::RedisWrapper < Cachy::Wrapper
|
|
17
17
|
def delete(key)
|
18
18
|
@wrapped.del(key)
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
data/lib/cachy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cachy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_memory_store
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.
|
60
|
+
rubygems_version: 2.5.1
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: See which gems depend on your gems
|