forest_admin_agent 1.35.1 → 1.35.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15d12af04878fa524aa9b4777a494f4007c632eac82f846cdde8b040f20362bd
|
|
4
|
+
data.tar.gz: 2cf2846e4b62c8f40f327cdcac8641353dd8220aa2ee69bad4262cc39ee348d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eee41846089c048442fb8729f2e3121751bd6cdec6da30a6b7b2a5f6f5449eb9e85b47d865ba218355b8cc2cd93d8d4bc104dd44ebe1f46143a8599a81252caf
|
|
7
|
+
data.tar.gz: c3bc4bcfd27d3529587cc3f4bd9fb3ce5aa316f83f9d37156cee08c018aa1306b94b25d408aea083b69d3d43886afc3cd79d6d2e461869981d9bb0ba667374dc
|
|
@@ -99,6 +99,8 @@ module ForestAdminAgent
|
|
|
99
99
|
|
|
100
100
|
# Reset route cache before sending schema to ensure routes are recomputed with all customizations
|
|
101
101
|
ForestAdminAgent::Http::Router.reset_cached_routes!
|
|
102
|
+
# The datasource was rebuilt, so the serializer's primary-key cache may be stale
|
|
103
|
+
ForestAdminAgent::Serializer::ForestSerializer.reset_cache!
|
|
102
104
|
@logger.log('Info', 'route cache cleared due to agent reload')
|
|
103
105
|
|
|
104
106
|
send_schema
|
|
@@ -24,11 +24,15 @@ module ForestAdminAgent
|
|
|
24
24
|
@@class_names[class_name] ||= class_name.gsub('::', '__')
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def self.reset_cache!
|
|
28
|
+
@@primary_keys = {}
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
def id
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
@@primary_keys ||= {}
|
|
33
|
+
primary_keys = @@primary_keys[type] ||= ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(
|
|
34
|
+
ForestAdminAgent::Facades::Container.datasource.get_collection(type)
|
|
30
35
|
)
|
|
31
|
-
primary_keys = ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(forest_collection)
|
|
32
36
|
primary_keys.map { |key| @object[key] }.join('|')
|
|
33
37
|
end
|
|
34
38
|
|