Commit 0295e3d4 authored by Łukasz Nowak's avatar Łukasz Nowak

Fixup cache usage.

parent 8bc13f7e
...@@ -176,7 +176,9 @@ class SlapTool(BaseTool): ...@@ -176,7 +176,9 @@ class SlapTool(BaseTool):
cache_plugin = self.getPortalObject().portal_caches\ cache_plugin = self.getPortalObject().portal_caches\
.getRamCacheRoot().get('last_stored_data_cache_factory')\ .getRamCacheRoot().get('last_stored_data_cache_factory')\
.getCachePluginList()[0] .getCachePluginList()[0]
cache_plugin.set(key, DEFAULT_CACHE_SCOPE, value) cache_plugin.set(key, DEFAULT_CACHE_SCOPE, value,
cache_duration=self.getPortalObject().portal_caches\
.getRamCacheRoot().get('last_stored_data_cache_factory').cache_duration)
def _getLastData(self, key): def _getLastData(self, key):
cache_plugin = self.getPortalObject().portal_caches\ cache_plugin = self.getPortalObject().portal_caches\
...@@ -186,6 +188,8 @@ class SlapTool(BaseTool): ...@@ -186,6 +188,8 @@ class SlapTool(BaseTool):
entry = cache_plugin.get(key, DEFAULT_CACHE_SCOPE) entry = cache_plugin.get(key, DEFAULT_CACHE_SCOPE)
except KeyError: except KeyError:
entry = None entry = None
else:
entry = entry.getValue()
return entry return entry
def _activateFillComputerInformationCache(self, computer_id, user, full): def _activateFillComputerInformationCache(self, computer_id, user, full):
......
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