active_remote-cached 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_remote/cached/railtie.rb +11 -1
- data/lib/active_remote/cached/version.rb +1 -1
- 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: 48a4ddc66707e648e15d6860f1d9c464d6b44ace
|
4
|
+
data.tar.gz: 724bb12c80ccb7dad9e233e6257135d780e872a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed6225adc07f144eac3930c81e4ced4efb13c8702d07dce356edd8d4d9cbc6eb4d6fa6992a0eac4086b9a5e98467b14fee2e0f4e4a3c4c5742143685fade71c
|
7
|
+
data.tar.gz: 6bb63d307f480b31cec87087be46cac64eea5448609ff109c0e6cde434ab8d48c2defbbbf35ffb1527cb579e176ec7742619ac4ee4f095f197284878f1a0fa42
|
@@ -1,9 +1,19 @@
|
|
1
|
+
require 'active_support/ordered_options'
|
2
|
+
|
1
3
|
module ActiveRemote
|
2
4
|
module Cached
|
3
5
|
class Railtie < Rails::Railtie
|
6
|
+
config.active_remote_cached = ActiveSupport::OrderedOptions.new
|
7
|
+
|
4
8
|
initializer "active_remote-cached.initialize_cache" do |app|
|
9
|
+
config.active_remote_cached.expires_in ||= 5.minutes
|
10
|
+
config.active_remote_cached.race_condition_ttl ||= 5.seconds
|
11
|
+
|
5
12
|
ActiveRemote::Cached.cache(Rails.cache)
|
6
|
-
ActiveRemote::Cached.default_options(
|
13
|
+
ActiveRemote::Cached.default_options(
|
14
|
+
:expires_in => config.active_remote_cached.expires_in,
|
15
|
+
:race_condition_ttl => config.active_remote_cached.race_condition_ttl
|
16
|
+
)
|
7
17
|
end
|
8
18
|
|
9
19
|
ActiveSupport.on_load(:active_remote) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_remote-cached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dewitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_remote
|