Implement encrypted transaction caching for GoCardless adapter

- Reduces GoCardless API calls by up to 99% through intelligent caching of transaction data
- Secure AES-GCM encryption with PBKDF2 key derivation (200k iterations) for at-rest storage
- Automatic range merging and transaction deduplication to minimize storage and API usage
- Cache-first approach with automatic fetching of uncovered date ranges
- Comprehensive test suite with 30 unit tests covering all cache operations and edge cases
- Thread-safe implementation with in-memory caching and encrypted disk persistence
This commit is contained in:
2025-11-21 21:16:11 +01:00
parent 9442d71e84
commit 49a975c43c
11 changed files with 1320 additions and 54 deletions

View File

@@ -1,6 +1,15 @@
FIREFLY_III_URL=
FIREFLY_III_API_KEY=
FIREFLY_III_CLIENT_ID=
GOCARDLESS_KEY=
GOCARDLESS_ID=
FIREFLY_III_URL=
FIREFLY_III_API_KEY=
FIREFLY_III_CLIENT_ID=
GOCARDLESS_KEY=
GOCARDLESS_ID=
# Required: Generate a secure random key (32+ characters recommended)
# Linux/macOS: od -vAn -N32 -tx1 /dev/urandom | tr -d ' '
# Windows PowerShell: [Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Minimum 0 -Maximum 256 }))
# Or use any password manager to generate a strong random string
BANKS2FF_CACHE_KEY=
# Optional: Custom cache directory (defaults to data/cache)
# BANKS2FF_CACHE_DIR=