Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use eTag for http caching #1034

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Use eTag for http caching #1034

merged 3 commits into from
Nov 26, 2024

Conversation

BPerlakiH
Copy link
Collaborator

Fixes: #1007

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 37.98%. Comparing base (20ce554) to head (585e419).

Files with missing lines Patch % Lines
ViewModel/LibraryViewModel.swift 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1034      +/-   ##
==========================================
- Coverage   39.01%   37.98%   -1.04%     
==========================================
  Files         119      119              
  Lines        6959     6969      +10     
==========================================
- Hits         2715     2647      -68     
- Misses       4244     4322      +78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly OK but those wide status code ranges are unnecessary and fragile

ViewModel/LibraryViewModel.swift Outdated Show resolved Hide resolved
ViewModel/LibraryViewModel.swift Outdated Show resolved Hide resolved
@rgaudin
Copy link
Member

rgaudin commented Nov 25, 2024

Question about code base: Are we currently following redirects? Should we return a redirect on the catalogURL (and eventually return the content), would that work as expected?

@BPerlakiH
Copy link
Collaborator Author

Question about code base: Are we currently following redirects? Should we return a redirect on the catalogURL (and eventually return the content), would that work as expected?

I did a test with this:

  • set up a local Flask (python) server with redirect to the real kiwix catalog url
  • pointed the application to get the catalog from the local URL
  • and it is redirecting and fetching as predicted

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@rgaudin rgaudin merged commit 4226ab1 into main Nov 26, 2024
4 checks passed
@rgaudin rgaudin deleted the 1007-http-caching-catalog branch November 26, 2024 09:15
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.

There seems to be no protection against fetching again an again the same version of the catalog
3 participants