multi_cache-rails 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -3
- data/lib/multi_cache/rails.rb +1 -1
- data/lib/multi_cache/version.rb +1 -1
- data/spec/rails_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59eca02809a426975afff0519d87d6c1c1ac28bb
|
4
|
+
data.tar.gz: 4385cf909f18177a290e84516d2d267a9a3728ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d3d85aa07dfc7d9f3aa95dc55aa5362c4c88fbad7526c9fc36087e00975a6033ac3aab87db9f180724407508af04dbde03eaae6b77885448e09f40532b47e4
|
7
|
+
data.tar.gz: 7ef0cbce67561e229d50f069fdb6e8056732f5ff263e915160ce904b99c48a2c1c6e611c515efca54ccd970e20d936bbc2fc1c6d04613123ab69119db05cc1ca
|
data/README.md
CHANGED
@@ -19,14 +19,22 @@ Or install it yourself as:
|
|
19
19
|
|
20
20
|
$ gem install multi_cache-rails
|
21
21
|
|
22
|
+
|
23
|
+
And then add "require" on 'project_root/config/application.rb'
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'rails/all'
|
27
|
+
require 'multi_cache'
|
28
|
+
```
|
29
|
+
|
22
30
|
## Usage
|
23
31
|
|
24
32
|
On `Application.configure` , it's like `project_root/config/emvironments/production.rb`
|
25
33
|
|
26
|
-
```
|
34
|
+
```ruby
|
27
35
|
YourProject::Application.configure do
|
28
36
|
|
29
|
-
config.cache_store = :dalli_store, 'localhost', { :
|
37
|
+
config.cache_store = :dalli_store, 'localhost', { compress: true }
|
30
38
|
config.cache_store = {
|
31
39
|
name: :secondary,
|
32
40
|
setting: :memory_store
|
@@ -35,7 +43,8 @@ end
|
|
35
43
|
```
|
36
44
|
|
37
45
|
Then, In your project, you can use the caches like below,
|
38
|
-
|
46
|
+
|
47
|
+
```ruby
|
39
48
|
Rails.cache.read("something") # fetch cached object from :dalli_store
|
40
49
|
Rails.cache(:secondary).read("something") # fetch cached object from :memory_store
|
41
50
|
```
|
data/lib/multi_cache/rails.rb
CHANGED
data/lib/multi_cache/version.rb
CHANGED
data/spec/rails_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_cache-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Uesugi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|