From dacfeafc5f5135401dcf82bf03743d71fe6e4597 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 10 Oct 2011 17:45:16 +0000 Subject: [PATCH] minor optimization --- lib/utils/hashdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/hashdb.py b/lib/utils/hashdb.py index a60eeae16..bfeba3415 100644 --- a/lib/utils/hashdb.py +++ b/lib/utils/hashdb.py @@ -10,6 +10,7 @@ See the file 'doc/COPYING' for copying permission import hashlib import sqlite3 +from lib.core.data import conf from lib.core.settings import UNICODE_ENCODING from lib.core.threads import getCurrentThreadData @@ -45,7 +46,7 @@ class HashDB(object): def retrieve(self, key): retVal = None - if key: + if key and not any([conf.flushSession, conf.freshQueries]): hash_ = self.hashKey(key) while True: try: