classifier cache timeout

This commit is contained in:
jonaswinkler 2021-02-06 21:03:32 +01:00
parent ffe96c8fff
commit 7702f5012b

View File

@ -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(