Only inject taxons and properties AMS data in pages where it's actually needed

This commit is contained in:
Matt-Yorkley
2021-08-16 13:19:23 +01:00
parent b94c586bc5
commit a98e4417c0
6 changed files with 20 additions and 4 deletions

View File

@@ -8,6 +8,10 @@
- content_for :injection_data do
- cache(*CacheService::FragmentCaching.ams_shop(@enterprise)) do
= inject_enterprise_shopfront(@enterprise)
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
%shop.darkswarm
- if @shopfront_layout == 'embedded'

View File

@@ -9,6 +9,10 @@
= inject_available_countries
= inject_group_enterprises
= inject_open_street_map_config
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
#group-page.row.pad-top.footer-pad{"ng-controller" => "GroupPageCtrl"}
.small-12.columns.pad-top

View File

@@ -54,10 +54,6 @@
= inject_current_hub
= inject_current_user
= inject_rails_flash
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
= inject_current_order
= inject_currency_config
= yield :injection_data

View File

@@ -5,5 +5,9 @@
= inject_available_countries
= inject_enterprise_shopfront_list
= inject_open_street_map_config
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
= render partial: "shared/map"

View File

@@ -4,6 +4,10 @@
- content_for :injection_data do
- cache @enterprises do
= inject_enterprises(@enterprises)
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
.producers{"ng-controller" => "EnterprisesCtrl", "ng-cloak" => true}
.row

View File

@@ -4,6 +4,10 @@
- content_for :injection_data do
- cache(*CacheService::FragmentCaching.ams_shops) do
= inject_enterprises(@enterprises)
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
= inject_taxons
- cache(*CacheService::FragmentCaching.ams_all_properties) do
= inject_properties
#panes
#shops.pane