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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c0a7bd4023ebbb079c20a6b79845d12ea0493a0
4
- data.tar.gz: 77d036b6babd1742da69e85804428e66f6c0c6ff
3
+ metadata.gz: 48a4ddc66707e648e15d6860f1d9c464d6b44ace
4
+ data.tar.gz: 724bb12c80ccb7dad9e233e6257135d780e872a7
5
5
  SHA512:
6
- metadata.gz: 01bd0c70bb4800a85e2ba2602f0806c85b9f5a72542ee827f295595d7190dda1bf3137da26242b311505c40428d757ba8e2f4aef3fe865ee3940af93b4b66b87
7
- data.tar.gz: dff531d3a5d86fba8b8ce4c9d171a7ff7011edb449e18a4e323766f8453c43154ba68c3eae7ae81f192ba89c030f1718dbbf3babbd921930d3d0d3badee4cf86
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(:race_condition_ttl => 5.seconds)
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRemote
2
2
  module Cached
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
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.7
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-02 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_remote