vident 0.2.0 → 0.2.1
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/lib/vident/caching/cache_key.rb +3 -7
- data/lib/vident/version.rb +1 -1
- 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: b58f418c48b9c37897a26d83c5b500bacd54c8f37cdb95bf549e5b283c00a36a
|
|
4
|
+
data.tar.gz: f2f76b2518a26933cac78eb7c7eb3ab6c0c1091a0e0bca020c8672ed7b947594
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab7baf21555430c664923fdfb1bbfc75a9eb8e56fef39839f1597951c48cf433c89d669898f429dcf87c724ccd5d016d89d06b82193db74dd57f7c3762a93392
|
|
7
|
+
data.tar.gz: a93dd215124bd3b6799e8b1519db632ae6521ce091ae9515b6bf943a3fc5987e5cbc301ecf751f778a891ef0ef6c21161103b07978580c4ca2c6430b5d789d48
|
|
@@ -20,6 +20,9 @@ module Vident
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def with_cache_key(*attrs, name: :_collection)
|
|
23
|
+
raise StandardError, "with_cache_key can only be used on components *without* slots as there is no eary way to track their content changes so too risky" if respond_to?(:slots?) && slots?
|
|
24
|
+
# Add view file to cache key
|
|
25
|
+
attrs << :component_modified_time
|
|
23
26
|
named_cache_key_includes(name, *attrs)
|
|
24
27
|
end
|
|
25
28
|
|
|
@@ -51,13 +54,6 @@ module Vident
|
|
|
51
54
|
|
|
52
55
|
attr_reader :component_dependencies
|
|
53
56
|
|
|
54
|
-
def with_cache_key(*attrs, name: :_collection)
|
|
55
|
-
raise StandardError, "with_cache_key can only be used on components *without* slots as there is no eary way to track their content changes so too risky" if slots?
|
|
56
|
-
# Add view file to cache key
|
|
57
|
-
attrs << :component_modified_time
|
|
58
|
-
super
|
|
59
|
-
end
|
|
60
|
-
|
|
61
57
|
def component_modified_time
|
|
62
58
|
return @component_modified_time if Rails.env.production? && @component_modified_time
|
|
63
59
|
# FIXME: This could stack overflow if there are circular dependencies
|
data/lib/vident/version.rb
CHANGED