--- a/src/pyams_portal/portlet.py Sat Jun 23 14:32:56 2018 +0200
+++ b/src/pyams_portal/portlet.py Mon Jun 25 09:42:24 2018 +0200
@@ -186,6 +186,7 @@
target_interface = None
use_portlets_cache = True
+ use_authentication = False
weight = 0
@@ -215,6 +216,8 @@
cache_key = PORTLETS_CACHE_DISPLAY_CONTEXT_KEY.format(portlet=ICacheKeyValue(self.settings),
context=ICacheKeyValue(self.context),
display=ICacheKeyValue(display_context))
+ if self.use_authentication:
+ cache_key = '{0}::{1}'.format(cache_key, self.request.principal.id)
# load rendered content from cache, or create output and store it in cache
try:
result = portlets_cache.get_value(cache_key)