pg_cache_key 0.1.7 → 0.1.8
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 +4 -4
- data/README.md +2 -2
- data/lib/pg_cache_key.rb +1 -1
- data/lib/pg_cache_key/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab935460692921f271ba3a6b0e67f823bba26e3
|
4
|
+
data.tar.gz: a1d0685bc66eac844a16e83a81887d9bf3d6d67b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1819b7165d988330f65b58edaa4a14260406abacf9e01179f45ff8b2b2e31f2b076b2763418bd7d565ce0ece8c225e50e8f1df5766b9bf5d7a3fc7cead38f1f1
|
7
|
+
data.tar.gz: 7d8ed9eef29a6aee08b1bf5355c9832388b98a73198ea4a220db3771fbdcb901e01aff923d52736e667e553f65ad1972cc4331ead0936cc29f0031604682c14d
|
data/README.md
CHANGED
@@ -81,11 +81,11 @@ Or install it yourself as:
|
|
81
81
|
$ gem install pg_cache_key
|
82
82
|
|
83
83
|
## Usage
|
84
|
-
It works out of the box.
|
84
|
+
It works out of the box. Plz don't use in on collection greater than 50K your DB will suffer.
|
85
85
|
|
86
86
|
## Как использовать
|
87
87
|
|
88
|
-
По идее работает само из коробки, но если будут траблы - пишите.
|
88
|
+
По идее работает само из коробки, но если будут траблы - пишите. Не стоит использовать для получаения кеш ключей коллекций больше 50К элементов, БДшка будет мучаться.
|
89
89
|
|
90
90
|
## Testing
|
91
91
|
rake spec
|
data/lib/pg_cache_key.rb
CHANGED
@@ -33,7 +33,7 @@ module ActiveRecord
|
|
33
33
|
return "#{self.class.to_s.underscore}/blank" if to_sql.blank?
|
34
34
|
@cache_keys ||= {}
|
35
35
|
@cache_keys[timestamp_column] ||= connection.execute( cache_key_raw_sql(timestamp_column) )[0]['cache_key']
|
36
|
-
@cache_keys[timestamp_column] ||=
|
36
|
+
@cache_keys[timestamp_column] ||= collection_cache_key
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
data/lib/pg_cache_key/version.rb
CHANGED