multi_cache-rails 4.2.1 → 4.2.2
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.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/lib/multi_cache/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9a50e9a74f5d7fc98c82445092674bba4dcbc3b
|
4
|
+
data.tar.gz: bee6530e0ad8ce1d9b10ee2547aa16f685d5ddcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 707b37a6662f4306b749550651f8f39344009785c790d602e0357963feb5fc027654759c855d2d7e3876cc816eb0265b713faa911c897e94d3a504232f3aa2be
|
7
|
+
data.tar.gz: 0674c29eb30c0b2b0e74139ff0799e7bd6aeb7abe6e2047c03f03ac9bc24f3478804a710adaf70aee77c9c7b318e6fc39d3d1af93457db69efe10b291cedc34c
|
data/README.md
CHANGED
@@ -19,11 +19,20 @@ 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
|
+
```
|
30
|
+
|
22
31
|
## Usage
|
23
32
|
|
24
33
|
On `Application.configure` , it's like `project_root/config/emvironments/production.rb`
|
25
34
|
|
26
|
-
```
|
35
|
+
```ruby
|
27
36
|
YourProject::Application.configure do
|
28
37
|
|
29
38
|
config.cache_store = :dalli_store, 'localhost', { :namespace => 'Fril', :compress => true }
|
@@ -35,7 +44,7 @@ end
|
|
35
44
|
```
|
36
45
|
|
37
46
|
Then, In your project, you can use the caches like below,
|
38
|
-
```
|
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/version.rb
CHANGED