Disable portlets cache when request params are not empty
authorThierry Florac <thierry.florac@onf.fr>
Tue, 27 Nov 2018 13:36:16 +0100
changeset 219 dd049d6d0503
parent 218 0afe54c9fecd
child 220 b2858d5e3449
Disable portlets cache when request params are not empty
src/pyams_portal/portlet.py
--- a/src/pyams_portal/portlet.py	Fri Nov 16 15:33:18 2018 +0100
+++ b/src/pyams_portal/portlet.py	Tue Nov 27 13:36:16 2018 +0100
@@ -180,7 +180,6 @@
         return PORTLET_RENDERER_SETTINGS_KEY.format(self.settings.renderer)
 
     target_interface = None
-    use_portlets_cache = True
     use_authentication = False
 
     weight = 0
@@ -198,6 +197,10 @@
     def renderer_settings(self):
         return IPortletRendererSettings(self.settings)
 
+    @property
+    def use_portlets_cache(self):
+        return not bool(self.request.params)
+
     def update(self):
         super(PortletRenderer, self).update()
         for resource in self.resources: