redis-activesupport-with-cas 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/active_support/cache/redis_store_with_cas.rb +1 -5
- data/redis-activesupport-with-cas.gemspec +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: 959d6afec4261fe4517850052f7bdcb61ef409d1
|
4
|
+
data.tar.gz: 51abad4cb3a8d037748c71ee3093f1be7faf8b90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd1bd9ab51df30aec6519441ccda337b078581622256932665170ad720cb69401bc1d57870cb568f95d4f13497c5b3ef4b88dd300f206e495820f98d00e2da67
|
7
|
+
data.tar.gz: d3fce630d16efd33df097de981cd3fa353ca847bf075a17766e9eeb605f4b6b92b03ebc5a7a1beb5a44c4189704a0af1fa0d67a85d38adb8ae0c917e159f2db4
|
data/README.md
CHANGED
@@ -17,6 +17,15 @@ gem 'redis-activesupport-with-cas'
|
|
17
17
|
ActiveSupport::Cache.lookup_store :redis_store_with_cas # { ... optional configuration ... }
|
18
18
|
```
|
19
19
|
|
20
|
+
### Usage with `IdentityCache`
|
21
|
+
|
22
|
+
Inside your environments configuration add following line:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
config.cache_store = :redis_store_with_cas, { :host => 'localhost', :port => 6379, :db => 0, :namespace => "data_cache", :expires_in => 15.minutes, :race_condition_ttl => 1}
|
26
|
+
IdentityCache.cache_backend = ActiveSupport::Cache.lookup_store(*Rails.configuration.cache_store)
|
27
|
+
```
|
28
|
+
|
20
29
|
## Running tests
|
21
30
|
|
22
31
|
```shell
|
@@ -29,4 +38,4 @@ bundle exec rake
|
|
29
38
|
|
30
39
|
## Copyright
|
31
40
|
|
32
|
-
2017 Rajko Albrecht, released under the MIT license
|
41
|
+
2017 Rajko Albrecht, released under the MIT license
|
@@ -65,14 +65,10 @@ module ActiveSupport
|
|
65
65
|
check_and_extend_cas
|
66
66
|
end
|
67
67
|
|
68
|
-
def candocas?
|
69
|
-
@data.is_a?(Redis::Store) && @data.respond_to?(:cas)
|
70
|
-
end
|
71
|
-
|
72
68
|
private
|
73
69
|
|
74
70
|
def check_and_extend_cas
|
75
|
-
extend RedisStoreCas
|
71
|
+
extend RedisStoreCas
|
76
72
|
end
|
77
73
|
|
78
74
|
end
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'redis-activesupport-with-cas'
|
6
|
-
s.version = '0.0.
|
6
|
+
s.version = '0.0.4'
|
7
7
|
s.authors = ['Rajko Albrecht']
|
8
8
|
s.email = ['ral@alwins-world.de']
|
9
9
|
s.homepage = 'https://git.alwin-it.de/alwin/redis-activesupport-with-cas'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-activesupport-with-cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajko Albrecht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project: redis-activesupport-with-cas
|
232
|
-
rubygems_version: 2.
|
232
|
+
rubygems_version: 2.6.13
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Extend redis activesupport for Ruby frameworks with cas
|