redis-memo 0.0.0.beta.5 → 0.0.0.beta.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis_memo/memoize_query/invalidation.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10f721bc9b55f26c51674ce16f120bc643c306748dd9ff5aa5f54a7d9b944b51
|
4
|
+
data.tar.gz: 3cf3fefe9a5119d231bf973da22aa7787fcac1cf71f46ab0cadc5421cc82da52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a576fa80cef7462769055bdf657e0ee0f70fc9fb63a08f5b4ceabb931faaa8c6c8d310f01424c2124c7842b00d3c069d7c31499fc4dff166544e85b52989d0bd
|
7
|
+
data.tar.gz: 45cc8638df93f0c22fd050ad39b25fd1d8671ac309fbee8e41979d51e0a6136e7c98d9fc9a31acd9e1e1828c592f5b2068349f6a0e1bb294664fcacea8911f48
|
@@ -126,6 +126,7 @@ class RedisMemo::MemoizeQuery::Invalidation
|
|
126
126
|
if columns_to_update
|
127
127
|
RedisMemo::MemoizeQuery::Invalidation.send(
|
128
128
|
:select_by_columns,
|
129
|
+
model_class,
|
129
130
|
records,
|
130
131
|
columns_to_update,
|
131
132
|
)
|
@@ -157,8 +158,9 @@ class RedisMemo::MemoizeQuery::Invalidation
|
|
157
158
|
end
|
158
159
|
end
|
159
160
|
|
160
|
-
def self.select_by_columns(records, columns_to_update)
|
161
|
-
|
161
|
+
def self.select_by_columns(model_class, records, columns_to_update)
|
162
|
+
return [] if records.empty?
|
163
|
+
|
162
164
|
or_chain = nil
|
163
165
|
columns_to_select = columns_to_update & RedisMemo::MemoizeQuery
|
164
166
|
.memoized_columns(model_class)
|