Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions openedx/core/lib/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""


import collections
import functools
import itertools
import pickle
Expand Down Expand Up @@ -125,7 +124,9 @@ def __init__(self, func):
self.cache = {}

def __call__(self, *args):
if not isinstance(args, collections.abc.Hashable):
try:
hash(args)
except TypeError:
# uncacheable. a list, for instance.
# better to not cache than blow up.
return self.func(*args)
Expand Down
Loading