From 4d098448f5f1997f106ca7d98c86e6b64c5537e1 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 20 Apr 2020 19:14:55 +0200 Subject: [PATCH] Cache rendered AMS arrays in darkswarm layout based on latest timestamps of rendered object classes --- app/views/layouts/darkswarm.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index fa42b8f745..d080be45dd 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -48,8 +48,10 @@ = inject_current_hub = inject_current_user = inject_rails_flash - = inject_taxons - = inject_properties + - cache "inject-all-taxons-#{CacheService.latest_timestamp_by_class(Spree::Taxon)}" do + = inject_taxons + - cache "inject-all-properties-#{CacheService.latest_timestamp_by_class(Spree::Property)}" do + = inject_properties = inject_current_order = inject_currency_config = yield :injection_data