Commit 18cb316e authored by Rafael Monnerat's avatar Rafael Monnerat

SlapTool: Cache getHateoasUrl

parent 01bfd371
...@@ -481,8 +481,11 @@ class SlapTool(BaseTool): ...@@ -481,8 +481,11 @@ class SlapTool(BaseTool):
""" """
Return preferred HATEOAS URL. Return preferred HATEOAS URL.
""" """
preference_tool = self.getPortalObject().portal_preferences
try: try:
url = self.getPortalObject().portal_preferences.getPreferredHateoasUrl() url = CachingMethod(preference_tool.getPreferredHateoasUrl,
id='getHateoasUrl',
cache_factory='slap_cache_factory')()
except AttributeError: except AttributeError:
raise NotFound raise NotFound
if not url: if not url:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment