Updated header and footer cache key
authorThierry Florac <thierry.florac@onf.fr>
Mon, 09 Jul 2018 12:43:15 +0200
changeset 814 f5b6878378a2
parent 813 98dbe0493e74
child 815 5be2aa7fc4e0
Updated header and footer cache key
src/pyams_content/features/footer/skin/__init__.py
src/pyams_content/features/header/skin/__init__.py
--- a/src/pyams_content/features/footer/skin/__init__.py	Mon Jul 09 12:05:52 2018 +0200
+++ b/src/pyams_content/features/footer/skin/__init__.py	Mon Jul 09 12:43:15 2018 +0200
@@ -63,7 +63,7 @@
         else:
             portlets_cache = get_cache(PORTLETS_CACHE_REGION, PORTLETS_CACHE_NAME)
             cache_key = PORTLETS_CACHE_KEY.format(portlet=self.name,
-                                                  context=ICacheKeyValue(self.settings))
+                                                  context=ICacheKeyValue(self.settings_target))
             if self.context is not self.request.context:  # display shared content
                 cache_key = '{0}::shared'.format(cache_key)
             try:
--- a/src/pyams_content/features/header/skin/__init__.py	Mon Jul 09 12:05:52 2018 +0200
+++ b/src/pyams_content/features/header/skin/__init__.py	Mon Jul 09 12:43:15 2018 +0200
@@ -69,7 +69,7 @@
         else:
             portlets_cache = get_cache(PORTLETS_CACHE_REGION, PORTLETS_CACHE_NAME)
             cache_key = PORTLETS_CACHE_KEY.format(portlet=self.name,
-                                                  context=ICacheKeyValue(self.settings))
+                                                  context=ICacheKeyValue(self.settings_target))
             if self.context is not self.request.context:  # display shared content
                 cache_key = '{0}::shared'.format(cache_key)
             try: