switchman 1.11.6 → 1.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/switchman/active_record/query_cache.rb +9 -5
- data/lib/switchman/version.rb +1 -1
- metadata +3 -4
- data/db/shard_1708.sqlite3 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1226a18b3b4a82f0362cf1b706fd97c1f3ef84067781908421f7852c312e8d56
|
4
|
+
data.tar.gz: 28acc935d4292c51a9ef0d4a1644b110c00fa414fb2e9e20b272848c66a4a9e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29ef4b1c6ed6daf73361622702ee5a27232ba8adfbc7049be660f3e6e3074204cf116e09d5388c2dfc927b8b073ff973f17d24c0824f472eb87c83f9d3057db0
|
7
|
+
data.tar.gz: dadcf10f6ca9cee1c1acd5c0d15b342f8c143b3c7f1d31728aeefecc61fdc71f45ecf9b0e64b9db20618adc74277bcd6a9200bc3a6752d67ea187ba7b43b1fd3
|
@@ -98,13 +98,17 @@ module Switchman
|
|
98
98
|
@lock.synchronize do
|
99
99
|
result =
|
100
100
|
if query_cache[sql].key?(binds)
|
101
|
+
args = {
|
102
|
+
sql: sql,
|
103
|
+
binds: binds,
|
104
|
+
name: name,
|
105
|
+
connection_id: object_id,
|
106
|
+
cached: true
|
107
|
+
}
|
108
|
+
args[:type_casted_binds] = -> { type_casted_binds(binds) } if ::Rails.version >= '5.1.5'
|
101
109
|
::ActiveSupport::Notifications.instrument(
|
102
110
|
"sql.active_record",
|
103
|
-
|
104
|
-
binds: binds,
|
105
|
-
name: name,
|
106
|
-
connection_id: object_id,
|
107
|
-
cached: true,
|
111
|
+
args
|
108
112
|
)
|
109
113
|
query_cache[sql][binds]
|
110
114
|
else
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -177,7 +177,6 @@ files:
|
|
177
177
|
- db/migrate/20130328212039_create_switchman_shards.rb
|
178
178
|
- db/migrate/20130328224244_create_default_shard.rb
|
179
179
|
- db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
|
180
|
-
- db/shard_1708.sqlite3
|
181
180
|
- lib/switchman.rb
|
182
181
|
- lib/switchman/action_controller/caching.rb
|
183
182
|
- lib/switchman/active_record/abstract_adapter.rb
|
@@ -244,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
243
|
version: '0'
|
245
244
|
requirements: []
|
246
245
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.
|
246
|
+
rubygems_version: 2.7.3
|
248
247
|
signing_key:
|
249
248
|
specification_version: 4
|
250
249
|
summary: Rails 4 sharding magic
|
data/db/shard_1708.sqlite3
DELETED
File without changes
|