fix: Don't cache anything hashable
If filters are list or dict then they aren't hashable, there was little reason to do this IMO. If something is indeed cacheable then where is the eviction for it? simple k:v is only thing we can realistically cache here.
This commit is contained in:
parent
9fd891d01e
commit
eaa6e4003a
1 changed files with 1 additions and 1 deletions
|
|
@ -595,7 +595,7 @@ class Database:
|
|||
"""
|
||||
out = None
|
||||
cache_key = None
|
||||
if cache and isinstance(filters, Hashable):
|
||||
if cache and isinstance(filters, str):
|
||||
cache_key = (doctype, filters, fieldname)
|
||||
if cache_key in self.value_cache:
|
||||
return self.value_cache[cache_key]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue