FeatureFuel
6

[Feature Request] AI Suggestions Cache

Source: paperless-ngx/paperless-ngx#13648 · opened by @n3roGit
Description Description When using Paperless AI suggestions (/api/documents/<id>/ai_suggestions/), results are cached in Redis with a hard-coded TTL of 50 minutes (CACHE_50_MINUTES in documents/caching.py). On cache hit the TTL is refreshed, but idle entries expire. Any document post_save also invalidates the cache immediately. For setups with a local / self-hosted LLM (often slow: tens of seconds to minutes per classification), this is awkward: 1. We warm the cache from a post-consume script (GET …/ai_suggestions/) so suggestions are ready when a human opens the document. 2. If the document is not opened within ~50 minutes, the expensive LLM work is discarded and must be recomputed on next open. 3. There is no documented env var to configure this TTL (unlike e.g. PAPERLESS_READ_CACHE_TTL for the read/cachalot cache). Feature request / discussion 1. Configurable AI suggestion cache TTL Please consider making the LLM suggestion cache TTL configurable, e.g.: …

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests