Don't cache empty default prefs

This commit is contained in:
Zed 2019-09-08 12:49:41 +02:00
parent d7e0fa6059
commit f1d566fff6

View file

@ -39,7 +39,6 @@ proc getPrefs*(id: string): Prefs =
result.getOne("id = ?", id) result.getOne("id = ?", id)
except KeyError: except KeyError:
result = genDefaultPrefs() result = genDefaultPrefs()
cache(result)
proc resetPrefs*(prefs: var Prefs) = proc resetPrefs*(prefs: var Prefs) =
var defPrefs = genDefaultPrefs() var defPrefs = genDefaultPrefs()