Skip to content

Improve local caching by verifying ETag headers to ensure freshness #13

@thuongle2210

Description

@thuongle2210

Is your feature request related to a problem? Please describe.
Currently, the caching mechanism only checks if the cache file exists locally but does not verify the ETag condition, which can result in using stale cached files even if the remote resource has changed.

Describe the solution you'd like
Implement proper ETag validation to ensure cached files are only reused when the server confirms no changes via ETag. Otherwise, the updated file should be downloaded and cached accordingly.

Describe alternatives you've considered
Currently, no alternatives have been implemented; the cache check relies solely on file existence without verifying freshness via ETag.

Additional context
This fix includes adding test cases for both server-side support and lack of support for ETag generation to ensure correct behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions