montage_rails 0.4.9 → 0.4.10
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb186dd144706726167866ed936c5141b65f6c67
|
4
|
+
data.tar.gz: 28a93eb753728e384ed95c1f505e56b15e557a5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3500fcf4fcda7d534507932c031859bbec21f6b7ce7e4bfc8b59afab67bf6b60763408c6c9e1387d7d21e1efaa9335c3e16ee3fe5b2c0ed8b721dff5ad2a802
|
7
|
+
data.tar.gz: 0d4ce0b65a0b6d9942c2996e44bb70398d2671fd245048f68dc145dc3b1170121198cf61d890a1c14eb2bcaa5c48db917f17db500c60f1347c2be9399cabf893
|
data/lib/montage_rails/base.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
module MontageRails
|
2
2
|
class QueryCache
|
3
3
|
attr_reader :cache
|
4
|
+
attr_accessor :no_cache
|
4
5
|
|
5
|
-
def initialize
|
6
|
+
def initialize(no_cache = false)
|
6
7
|
@cache = {}
|
8
|
+
@no_cache = no_cache
|
7
9
|
end
|
8
10
|
|
9
11
|
def get_or_set_query(klass, query)
|
10
|
-
cached = cache.keys.include?("#{klass}/#{query}")
|
12
|
+
cached = cache.keys.include?("#{klass}/#{query}") && !no_cache
|
11
13
|
ActiveSupport::Notifications.instrument("reql.montage_rails", notification_payload(query, klass, cached)) do
|
12
14
|
if cached
|
13
15
|
cache["#{klass}/#{query}"]
|
data/lib/montage_rails.rb
CHANGED
@@ -1095,3 +1095,10 @@ MontageClient: Checkin connection MontageClient:http://testco.dev.montagehot.clu
|
|
1095
1095
|
[1m[36mActor Create (427.4ms)[0m [1m{:movie_id=>"02290fa2-6a62-4910-9074-d97641dceb24", :name=>"Marty McFly"}[0m
|
1096
1096
|
[1m[35mActor Load [CACHE] (0.0ms)[0m {:filter=>{:movie_id=>"02290fa2-6a62-4910-9074-d97641dceb24"}}
|
1097
1097
|
[1m[36mActor Load (461.6ms)[0m [1m{:filter=>{:movie_id=>"02290fa2-6a62-4910-9074-d97641dceb24"}}[0m
|
1098
|
+
[1m[36mMovie Load (1292.4ms)[0m [1m{:filter=>{}, :limit=>1}[0m
|
1099
|
+
[1m[36mMovie Load (344.1ms)[0m [1m{:filter=>{}, :limit=>1}[0m
|
1100
|
+
[1m[35mMovie Load [CACHE] (846.4ms)[0m {:filter=>{}, :limit=>1}
|
1101
|
+
[1m[36mMovie Load (1595.1ms)[0m [1m{:filter=>{}, :limit=>1}[0m
|
1102
|
+
[1m[35mMovie Load [CACHE] (213.7ms)[0m {:filter=>{}, :limit=>1}
|
1103
|
+
[1m[36mMovie Load (294.5ms)[0m [1m{:filter=>{}, :limit=>1}[0m
|
1104
|
+
[1m[35mMovie Load (248.0ms)[0m {:filter=>{}, :limit=>1}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: montage_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dphaener
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|