From d78c9cd545f96a8d16a52426e9e94a5bd9434142 Mon Sep 17 00:00:00 2001 From: Karim Tayie Date: Wed, 30 Dec 2020 22:28:43 +0200 Subject: [PATCH] Add default timeout to cache memoize --- src/cache_memoize/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cache_memoize/__init__.py b/src/cache_memoize/__init__.py index 3ab5c34..3b90f44 100644 --- a/src/cache_memoize/__init__.py +++ b/src/cache_memoize/__init__.py @@ -4,6 +4,7 @@ from urllib.parse import quote from django.core.cache import caches, DEFAULT_CACHE_ALIAS +from django.core.cache.backends.base import DEFAULT_TIMEOUT from django.utils.encoding import force_bytes @@ -11,7 +12,7 @@ def cache_memoize( - timeout, + timeout=DEFAULT_TIMEOUT, prefix=None, args_rewrite=None, hit_callable=None,