diff src/core/sat_main.py @ 2509:d485e9416493

core (memory/cache): common cache: host has now a common_cache attribute for data which can be shared between profiles. client.cache is for private data
author Goffi <goffi@goffi.org>
date Fri, 02 Mar 2018 17:40:09 +0100
parents 769e8d9d2438
children e8e1507049b7
line wrap: on
line diff
--- a/src/core/sat_main.py	Fri Mar 02 17:37:41 2018 +0100
+++ b/src/core/sat_main.py	Fri Mar 02 17:40:09 2018 +0100
@@ -29,7 +29,8 @@
 from sat.core.log import getLogger
 log = getLogger(__name__)
 from sat.core.constants import Const as C
-from sat.memory.memory import Memory
+from sat.memory import memory
+from sat.memory import cache
 from sat.tools import trigger
 from sat.tools import utils
 from sat.tools.common import dynamic_import
@@ -58,7 +59,7 @@
         self.plugins = {}
         self.ns_map = {u'x-data': u'jabber:x:data'}  # map for short name to whole namespace,
                                                       # extended by plugins with registerNamespace
-        self.memory = Memory(self)
+        self.memory = memory.Memory(self)
         self.trigger = trigger.TriggerManager()  # trigger are used to change SàT behaviour
 
         bridge_name = self.memory.getConfig('', 'bridge', 'dbus')
@@ -149,6 +150,7 @@
 
     def _postMemoryInit(self, ignore):
         """Method called after memory initialization is done"""
+        self.common_cache = cache.Cache(self, None)
         log.info(_("Memory initialised"))
         try:
             self._import_plugins()