aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/java/persistence.rs
diff options
context:
space:
mode:
authorBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-27 05:56:59 +0100
committerBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-29 03:03:59 +0100
commit68a493ef22cb0558a05dd3881c7d8cb4999d9679 (patch)
tree06d28e7c3b102943180e54c6f612f5e87a4b3ba3 /src-tauri/src/core/java/persistence.rs
parentf4078c987a3899d4031acb49d72aa418432e046d (diff)
downloadDropOut-68a493ef22cb0558a05dd3881c7d8cb4999d9679.tar.gz
DropOut-68a493ef22cb0558a05dd3881c7d8cb4999d9679.zip
feat(java): implement cache versioning, size limits, and automatic cleanup
- Add CACHE_VERSION constant for cache format compatibility tracking - Add MAX_CACHE_SIZE_BYTES limit (10 MB) to prevent unbounded cache growth - Add cache_version field to JavaCatalog struct with default value - Implement cache version validation in load_cached_catalog() - Implement cache size enforcement in save_catalog_cache() - Add cleanup_expired_caches() for background cache cleanup - Add enforce_cache_size_limit() to validate cache file sizes - Add is_cache_version_compatible() helper function - Automatically clean up expired caches on load and clear operations - Validate cache version before using cached data Fixes: - Cache expiration without automatic cleanup (now cleaned on load) - Missing cache version control (now validates format compatibility) - Unbounded cache size growth (now limited to 10 MB) Reviewed-by: Claude 3.5 Sonnet
Diffstat (limited to 'src-tauri/src/core/java/persistence.rs')
0 files changed, 0 insertions, 0 deletions