equal
deleted
inserted
replaced
184 def settings_key(self): |
184 def settings_key(self): |
185 return PORTLET_RENDERER_SETTINGS_KEY.format(self.settings.renderer) |
185 return PORTLET_RENDERER_SETTINGS_KEY.format(self.settings.renderer) |
186 |
186 |
187 target_interface = None |
187 target_interface = None |
188 use_portlets_cache = True |
188 use_portlets_cache = True |
|
189 use_authentication = False |
189 |
190 |
190 weight = 0 |
191 weight = 0 |
191 |
192 |
192 @property |
193 @property |
193 def slot_configuration(self): |
194 def slot_configuration(self): |
213 context=ICacheKeyValue(self.context)) |
214 context=ICacheKeyValue(self.context)) |
214 else: |
215 else: |
215 cache_key = PORTLETS_CACHE_DISPLAY_CONTEXT_KEY.format(portlet=ICacheKeyValue(self.settings), |
216 cache_key = PORTLETS_CACHE_DISPLAY_CONTEXT_KEY.format(portlet=ICacheKeyValue(self.settings), |
216 context=ICacheKeyValue(self.context), |
217 context=ICacheKeyValue(self.context), |
217 display=ICacheKeyValue(display_context)) |
218 display=ICacheKeyValue(display_context)) |
|
219 if self.use_authentication: |
|
220 cache_key = '{0}::{1}'.format(cache_key, self.request.principal.id) |
218 # load rendered content from cache, or create output and store it in cache |
221 # load rendered content from cache, or create output and store it in cache |
219 try: |
222 try: |
220 result = portlets_cache.get_value(cache_key) |
223 result = portlets_cache.get_value(cache_key) |
221 logger.debug("Retrieving portlet content for cache key {0}".format(cache_key)) |
224 logger.debug("Retrieving portlet content for cache key {0}".format(cache_key)) |
222 except KeyError: |
225 except KeyError: |