From ee83063ed7981752a4185a6e5e4d9147529eaa4e Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 11 Jun 2013 22:39:12 +0200 Subject: [PATCH] [entropy.db.sqlite] expose default cache size to _CACHE_SIZE --- lib/entropy/db/sqlite.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/entropy/db/sqlite.py b/lib/entropy/db/sqlite.py index c845b6531..ec7c25bb8 100644 --- a/lib/entropy/db/sqlite.py +++ b/lib/entropy/db/sqlite.py @@ -134,6 +134,7 @@ class EntropySQLiteRepository(EntropySQLRepository): _INSERT_OR_REPLACE = "INSERT OR REPLACE" _INSERT_OR_IGNORE = "INSERT OR IGNORE" _UPDATE_OR_REPLACE = "UPDATE OR REPLACE" + _CACHE_SIZE = 8192 SETTING_KEYS = ("arch", "on_delete_cascade", "schema_revision", "_baseinfo_extrainfo_2010") @@ -508,8 +509,8 @@ class EntropySQLiteRepository(EntropySQLRepository): self._clearLiveCache("_doesColumnInTableExist") self._setupInitialSettings() # set cache size - self.__setCacheSize(8192) - self.__setDefaultCacheSize(8192) + self.__setCacheSize(self._CACHE_SIZE) + self.__setDefaultCacheSize(self._CACHE_SIZE) self._databaseStructureUpdates() self.commit()