Exemplo n.º 1
0
    def createPersistenCache(self, filename, ext=".cache"):
        '''Create persistent cache - dict. On cache delete is stored as pickle on hdd.'''
        if not ext.startswith("."):
            ext = "." + ext

        if self._cache:
            self._cache.dumpCache()

        createFolderStruc(self.cacheFolder)

        path = makePath(os.path.join(self.cacheFolder, filename) + ext)
        self._cache = _SimpleCache(path, persistent=True)

        pass
Exemplo n.º 2
0
    def createPersistenCache(self, filename, ext = ".cache"):
        '''Create persistent cache - dict. On cache delete is stored as pickle on hdd.'''
        if not ext.startswith("."):
            ext = "." + ext
            
        if self._cache:
            self._cache.dumpCache()
        

        createFolderStruc(self.cacheFolder)
            
        path = makePath(os.path.join(self.cacheFolder,filename)+ext)
        self._cache = _SimpleCache(path, persistent = True)
           
        pass
Exemplo n.º 3
0
 def createMemoryCache(self):
     '''Create memory cache - dictionary.'''
     self._cache = _SimpleCache()
     pass
Exemplo n.º 4
0
 def createMemoryCache(self):
     '''Create memory cache - dictionary.'''
     self._cache = _SimpleCache()
     pass