# HG changeset patch # User Mads Kiilerich # Date 1420502076 -3600 # Node ID 3246e58d15433fa97a54984659a88f2a335e0c62 # Parent 30a1b3fdd713dc5fd67beab77929272b839cd4a6 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. diff -r 30a1b3fdd713 -r 3246e58d1543 kallithea/lib/utils.py --- 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: