mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-20 05:26:53 +01:00
Feature: Add additional caching support to suggestions and metadata (#5414)
* Adds ETag and Last-Modified headers to suggestions, metadata and previews * Slight update to the suggestions etag * Small user message for why classifier didn't train again
This commit is contained in:
parent
0068f091bb
commit
e16645b146
4 changed files with 185 additions and 0 deletions
|
|
@ -207,6 +207,7 @@ class DocumentClassifier:
|
|||
self.last_doc_change_time is not None
|
||||
and self.last_doc_change_time >= latest_doc_change
|
||||
) and self.last_auto_type_hash == hasher.digest():
|
||||
logger.info("No updates since last training")
|
||||
return False
|
||||
|
||||
# subtract 1 since -1 (null) is also part of the classes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue