Merge caching

This commit is contained in:
shamoon 2025-04-08 16:36:31 -07:00
parent b92651aad2
commit 730636f38e
No known key found for this signature in database
7 changed files with 22 additions and 22 deletions

View File

@ -23,10 +23,10 @@ from django.utils import timezone
from filelock import FileLock
from guardian.shortcuts import remove_perm
from documents.caching import clear_document_caches
from documents.mail import send_email
from documents.templating.workflows import parse_w_workflow_placeholders
from paperless import matching
from paperless.caching import clear_document_caches
from paperless.file_handling import create_source_path_directory
from paperless.file_handling import delete_empty_directories
from paperless.file_handling import generate_unique_filename

View File

@ -20,7 +20,6 @@ from filelock import FileLock
from whoosh.writing import AsyncWriter
from documents import sanity_checker
from documents.caching import clear_document_caches
from documents.plugins.base import ConsumeTaskPlugin
from documents.plugins.base import ProgressManager
from documents.plugins.base import StopConsumeTaskError
@ -31,6 +30,7 @@ from documents.signals.handlers import cleanup_document_deletion
from documents.signals.handlers import run_workflows
from paperless import index
from paperless.barcodes import BarcodePlugin
from paperless.caching import clear_document_caches
from paperless.classifier import DocumentClassifier
from paperless.classifier import load_classifier
from paperless.consumer import ConsumerPlugin

View File

@ -24,13 +24,13 @@ from guardian.shortcuts import assign_perm
from rest_framework import status
from rest_framework.test import APITestCase
from documents.caching import CACHE_50_MINUTES
from documents.caching import CLASSIFIER_HASH_KEY
from documents.caching import CLASSIFIER_MODIFIED_KEY
from documents.caching import CLASSIFIER_VERSION_KEY
from documents.signals.handlers import run_workflows
from documents.tests.utils import DirectoriesMixin
from documents.tests.utils import DocumentConsumeDelayMixin
from paperless.caching import CACHE_50_MINUTES
from paperless.caching import CLASSIFIER_HASH_KEY
from paperless.caching import CLASSIFIER_MODIFIED_KEY
from paperless.caching import CLASSIFIER_VERSION_KEY
from paperless.data_models import DocumentSource
from paperless.models import Correspondent
from paperless.models import CustomField

View File

@ -17,10 +17,10 @@ if TYPE_CHECKING:
from django.conf import settings
from django.core.cache import cache
from documents.caching import CACHE_50_MINUTES
from documents.caching import CLASSIFIER_HASH_KEY
from documents.caching import CLASSIFIER_MODIFIED_KEY
from documents.caching import CLASSIFIER_VERSION_KEY
from paperless.caching import CACHE_50_MINUTES
from paperless.caching import CLASSIFIER_HASH_KEY
from paperless.caching import CLASSIFIER_MODIFIED_KEY
from paperless.caching import CLASSIFIER_VERSION_KEY
from paperless.models import Document
from paperless.models import MatchingModel

View File

@ -4,12 +4,12 @@ from datetime import timezone
from django.conf import settings
from django.core.cache import cache
from documents.caching import CACHE_5_MINUTES
from documents.caching import CACHE_50_MINUTES
from documents.caching import CLASSIFIER_HASH_KEY
from documents.caching import CLASSIFIER_MODIFIED_KEY
from documents.caching import CLASSIFIER_VERSION_KEY
from documents.caching import get_thumbnail_modified_key
from paperless.caching import CACHE_5_MINUTES
from paperless.caching import CACHE_50_MINUTES
from paperless.caching import CLASSIFIER_HASH_KEY
from paperless.caching import CLASSIFIER_MODIFIED_KEY
from paperless.caching import CLASSIFIER_VERSION_KEY
from paperless.caching import get_thumbnail_modified_key
from paperless.classifier import DocumentClassifier
from paperless.models import Document

View File

@ -89,12 +89,6 @@ from rest_framework.viewsets import ModelViewSet
from rest_framework.viewsets import ReadOnlyModelViewSet
from rest_framework.viewsets import ViewSet
from documents.caching import get_metadata_cache
from documents.caching import get_suggestion_cache
from documents.caching import refresh_metadata_cache
from documents.caching import refresh_suggestions_cache
from documents.caching import set_metadata_cache
from documents.caching import set_suggestions_cache
from documents.filters import CorrespondentFilterSet
from documents.filters import CustomFieldFilterSet
from documents.filters import DocumentFilterSet
@ -121,6 +115,12 @@ from paperless import version
from paperless.bulk_download import ArchiveOnlyStrategy
from paperless.bulk_download import OriginalAndArchiveStrategy
from paperless.bulk_download import OriginalsOnlyStrategy
from paperless.caching import get_metadata_cache
from paperless.caching import get_suggestion_cache
from paperless.caching import refresh_metadata_cache
from paperless.caching import refresh_suggestions_cache
from paperless.caching import set_metadata_cache
from paperless.caching import set_suggestions_cache
from paperless.celery import app as celery_app
from paperless.classifier import load_classifier
from paperless.conditionals import metadata_etag