changeset 4754:3246e58d1543

utils: don't use FromCache - it doesn't work properly It seems like the caching worked fine for caching the list of ui_ids. The actual records were however not cached so they had to be fetched one by one anyway. Fetching everything up front is cheaper than fetching one by one.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Jan 2015 00:54:36 +0100
parents 30a1b3fdd713
children 244c9b103cff
files kallithea/lib/utils.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/lib/utils.py	Tue Jan 06 00:54:36 2015 +0100
@@ -362,9 +362,7 @@
 
     elif read_from == 'db':
         sa = meta.Session()
-        ret = sa.query(Ui)\
-            .options(FromCache("sql_cache_short", "get_hg_ui_settings"))\
-            .all()
+        ret = sa.query(Ui).all()
 
         hg_ui = ret
         for ui_ in hg_ui: