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: disable caching of non-static entities #151

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

bitpshr
Copy link
Contributor

@bitpshr bitpshr commented Jul 30, 2019

This pull request removes caching from non-static endpoints. This was a total oversight and could result in stale, cached entities being returned instead of the most up-to-date version.

After this change, the entity types below are the only ones that we'll cache (since they are all either static or requested using a static sha):

Activity
Asset
Changeset
Commit
Data
File
Layer
Membership
Notification
Preview
Share

References https://goabstract.atlassian.net/browse/PLATFORM-490

Copy link
Contributor

@amccloud amccloud left a comment

Choose a reason for hiding this comment

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

Good catch! Might be possible to introduce a new strategy for caching these in the future with updatedAt and overall staleness

@bitpshr
Copy link
Contributor Author

bitpshr commented Jul 30, 2019

@amccloud agreed; we could couple that with the ability to explicitly disable caching during a request by adding an option that all cached endpoints support for max-portability.

@bitpshr bitpshr merged commit 98ad004 into master Jul 30, 2019
@bitpshr bitpshr deleted the fix/disable-dynamic-entity-caching branch July 30, 2019 22:30
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.

2 participants