grape-listing 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/listing_service/serialization.rb +2 -5
- 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: ba00678e6ce8506dd80ac31e49dda56058cbb7ad385f2264018e18e9d9279632
|
4
|
+
data.tar.gz: a622910e11b063da43d43edcde6a76d40e66affeb53b3ce490ef0900d6012c54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2acc4de1f0cfd8406ffd4aa237df70b3058fba8a3d30ce0397aa4b617d6280a9a780c91f77c5d0f3e852f41bbf87b0875ef8582796ab1916d4f65eda4134d86
|
7
|
+
data.tar.gz: ccb7b6dfe1251b06760f39a7de49da40aed8ab31960d481536ec7b7cd59df32b5d21b173a7bb374a8247295c33a286e31e093090c9e1a8049b81dabfa090b155
|
@@ -46,10 +46,7 @@ module GrapeListing
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def caching_entity_representation(record)
|
49
|
-
|
50
|
-
params_string = Rack::Utils.build_query(@params.except('offset', 'page'))
|
51
|
-
key = "#{@grape_entity}:#{record.id}:#{params_string}"
|
52
|
-
enc_key = Digest::MD5.hexdigest(key)
|
49
|
+
key = "#{@grape_entity}:#{record.id}"
|
53
50
|
|
54
51
|
# опции кеширования
|
55
52
|
opts =
|
@@ -59,7 +56,7 @@ module GrapeListing
|
|
59
56
|
{}
|
60
57
|
end
|
61
58
|
|
62
|
-
GrapeListing.cache.fetch(
|
59
|
+
GrapeListing.cache.fetch(key, opts) do
|
63
60
|
@grape_entity.represent(record, @entity_opts).as_json
|
64
61
|
end
|
65
62
|
end
|