eric6/E5Utilities/E5Cache.py

changeset 7253
50dbe65a1334
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7252:c5e3705073eb 7253:50dbe65a1334
56 def __adjustToSize(self): 56 def __adjustToSize(self):
57 """ 57 """
58 Private method to adjust the cache to its size. 58 Private method to adjust the cache to its size.
59 """ 59 """
60 if self.__size: 60 if self.__size:
61 removeList, self.__keyList = \ 61 removeList = self.__keyList[:-self.__size]
62 self.__keyList[:-self.__size], self.__keyList[-self.__size:] 62 self.__keyList = self.__keyList[-self.__size:]
63 for key in removeList: 63 for key in removeList:
64 del self.__store[key] 64 del self.__store[key]
65 del self.__accesStore[key] 65 del self.__accesStore[key]
66 else: 66 else:
67 self.reset() 67 self.reset()

eric ide

mercurial