Changeset - 3246e58d1543
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-01-06 00:54:36
madski@unity3d.com
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.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils.py
Show inline comments
 
@@ -362,9 +362,7 @@ def make_ui(read_from='file', path=None,
 

	
 
    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:
0 comments (0 inline, 0 general)