mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Fix: Clear metadata cache when the filename(s) change (#5957)
* Update doc modified time upon move and rename * Clear the cached metadata if the filename(s) have been changed --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -189,6 +189,11 @@ def refresh_metadata_cache(
|
||||
cache.touch(doc_key, timeout)
|
||||
|
||||
|
||||
def clear_metadata_cache(document_id: int) -> None:
|
||||
doc_key = get_metadata_cache_key(document_id)
|
||||
cache.delete(doc_key)
|
||||
|
||||
|
||||
def get_thumbnail_modified_key(document_id: int) -> str:
|
||||
"""
|
||||
Builds the key to store a thumbnail's timestamp
|
||||
|
Reference in New Issue
Block a user