From 7702f5012b5eb2ed311d8abcb5d38b5ed8be1c85 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Sat, 6 Feb 2021 21:03:32 +0100 Subject: [PATCH] classifier cache timeout --- src/documents/classifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/documents/classifier.py b/src/documents/classifier.py index 5151d453c..81f860314 100755 --- a/src/documents/classifier.py +++ b/src/documents/classifier.py @@ -39,7 +39,8 @@ def load_classifier(): classifier = DocumentClassifier() try: classifier.load() - cache.set("paperless-classifier", classifier, version=version) + cache.set("paperless-classifier", classifier, + version=version, timeout=86400) except (EOFError, IncompatibleClassifierVersionError) as e: # there's something wrong with the model file. logger.error(