Improve invoice verification caching with permanent storage for reconciled items

Introduce adaptive caching durations for invoice verification: permanent caching for reconciled invoices, temporary caching for found invoices, and longer temporary caching for not-found invoices.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: daf3525c-b971-454a-b0c0-7a9845e786cc
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-08-31 07:39:11 +00:00
1 parent 6c853052f1
commit 97b63b61e8
3 files changed
+65 -20

No files matched your search

+4 -2
View File
@@ -1053,7 +1053,8 @@ export async function registerRoutes(app: Express): Promise<Server> {
result = await invoiceVerificationService.verifyInvoice(
invoiceReference,
delivery.groupId,
forceRefresh || false
forceRefresh || false,
delivery.reconciled || false
);
} else if (blNumber && blNumber.trim()) {
// Vérifier par numéro BL
@@ -1061,7 +1062,8 @@ export async function registerRoutes(app: Express): Promise<Server> {
blNumber,
delivery.supplier.name,
delivery.groupId,
forceRefresh || false
forceRefresh || false,
delivery.reconciled || false
);
} else {
result = {