Skip to content

Conversation

@Niphyr
Copy link
Contributor

@Niphyr Niphyr commented Oct 25, 2025

This pull request refactors the CacheService and related test initialisation to improve dependency management and cache validation logic. The main changes include injecting the new RawFileService dependency.

Dependency Injection and Initialisation

  • Added RawFileService as a dependency to CacheService, updating its constructor and test initialisations to support this change.
  • Changed protected member initialisations in CacheService from explicit constructors to collection initialisers for _registeredFiles and _cachedFileData.
  • Refactored cache file registration in CacheService to use the direct RegisterFileConfiguration method instead of casting to the interface.
  • Improved cache validation in GetParsedFileContentsAsync by checking disk cache validity and removing invalid files before loading new data.

Introduces RawFileService to handle raw file downloads, ETag validation, and cache management. CacheService now delegates raw file operations to RawFileService. Updates related tests and interfaces to support the new service. FileETag model extended with LastChecked property for ETag revalidation logic.
This also fixes #65
@Niphyr Niphyr linked an issue Oct 25, 2025 that may be closed by this pull request
@Niphyr Niphyr merged commit 47e9ad9 into master Oct 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If .raw data file doesn't exist, file isn't checked / downloaded

2 participants