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

fix: dont cache dataset metadata #177

Merged
merged 3 commits into from
Nov 3, 2021
Merged

Conversation

MDunitz
Copy link
Contributor

@MDunitz MDunitz commented Oct 28, 2021

https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/chanzuckerberg/single-cell-explorer/166

Reviewers

Functional:


Changes

  • modify dataset metadata endpoint to never cache

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #177 (bb9e82f) into main (2c120b6) will increase coverage by 71.71%.
The diff coverage is 100.00%.

❗ Current head bb9e82f differs from pull request most recent head 3aa2817. Consider uploading reports for the commit 3aa2817 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##           main     #177       +/-   ##
=========================================
+ Coverage      0   71.71%   +71.71%     
=========================================
  Files         0      126      +126     
  Lines         0    10098    +10098     
=========================================
+ Hits          0     7242     +7242     
- Misses        0     2856     +2856     
Flag Coverage Δ
frontend 71.71% <100.00%> (?)
javascript 71.71% <100.00%> (?)
unitTest 71.71% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/app/app.py 75.98% <100.00%> (ø)
server/converters/schema/validate.py 87.70% <0.00%> (ø)
common/corpora.py 95.00% <0.00%> (ø)
common/fbs/NetEncoding/Int32Array.py 53.33% <0.00%> (ø)
server/common/fbs/NetEncoding/Int32Array.py 53.33% <0.00%> (ø)
server/common/genesets.py 88.29% <0.00%> (ø)
server/common/config/base_config.py 94.93% <0.00%> (ø)
server/common/config/__init__.py 100.00% <0.00%> (ø)
server/cli/upgrade.py 34.04% <0.00%> (ø)
... and 117 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c120b6...3aa2817. Read the comment docs.

@@ -232,7 +232,7 @@ def get(self, data_adaptor):


class DatasetMetadataAPI(DatasetResource):
@cache_control(public=True, max_age=ONE_WEEK)
@cache_control(public=True, no_store=True, max_age=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want to eliminate public as well? I would think this is in conflict with no_store. Though public should be ignored, considering no other directives have an effect when used with no-store (see below).

public: The response may be stored by any cache, even if the response is normally non-cacheable.

no-store: The response may not be stored in any cache. Note that this does not prevent a valid pre-existing cached response being returned. Clients can set max-age=0 to also clear existing cache responses, as this forces the cache to revalidate with the server (no other directives have an effect when used with no-store).

Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you find this documentation?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good policy to have. Thank you!

@Bento007 Bento007 self-assigned this Nov 2, 2021
@Bento007 Bento007 requested a review from atolopko-czi November 3, 2021 16:56
@Bento007 Bento007 merged commit b4c4471 into main Nov 3, 2021
@Bento007 Bento007 deleted the dunitz/166-seamless-cache branch November 3, 2021 19:35
Bento007 added a commit that referenced this pull request Nov 4, 2021
* main:
  Delete schema_guide.md (#131)
  chore(deps): bump urllib3 from 1.25.9 to 1.26.5 in /hosted (#186)
  chore(deps): bump jinja2 from 2.11.2 to 2.11.3 in /hosted (#185)
  fix: dont cache dataset metadata (#177)
  explorer rdev (#144)
  Updated load indicator to match skeleton. (#139) (#171)
  Always show scrollbar on dataset menu if scrollable. (#138) (#173)
  fix: e2e base url (#179)

# Conflicts:
#	hosted/requirements.txt
#	server/app/app.py
#	server/tests/unit/common/apis/test_api_v2.py
@atolopko-czi atolopko-czi mentioned this pull request Nov 5, 2021
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.

3 participants