diff --git a/bookwyrm/utils/cache.py b/bookwyrm/utils/cache.py index c8262ef59..5e896e621 100644 --- a/bookwyrm/utils/cache.py +++ b/bookwyrm/utils/cache.py @@ -6,12 +6,12 @@ from django.core.cache import cache def get_or_set( cache_key: str, - function: Callable[..., str], + function: Callable[..., Any], *args: Tuple[Any, ...], timeout: Union[float, None] = None -) -> str: +) -> Any: """Django's built-in get_or_set isn't cutting it""" - value = str(cache.get(cache_key)) + value = cache.get(cache_key) if value is None: value = function(*args) cache.set(cache_key, value, timeout=timeout)