-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adds EndpointCache for handling GET resource caching #2184
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tanner0101
reviewed
Feb 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
tanner0101
approved these changes
Feb 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this one 👍
tanner0101
changed the title
Adds a generic EndpointCache<T> class
Adds EndpointCache<T>
Feb 15, 2020
tanner0101
changed the title
Adds EndpointCache<T>
EndpointCache for handling GET resource caching
Feb 15, 2020
tanner0101
changed the title
EndpointCache for handling GET resource caching
Adds EndpointCache for handling GET resource caching
Feb 15, 2020
Tests needed... 😉 |
tanner0101
approved these changes
Feb 17, 2020
These changes are now available in https://github.com/vapor/vapor/releases/tag/4.0.0-beta.3.20 |
mohpor
pushed a commit
to mohpor/vapor
that referenced
this pull request
Feb 18, 2020
* Adds a generic EndpointCache<T> class * Review fixups * Changed internal to private * Changed internal to private * Renamed the error * add EndpointCache tests * add CacheControl convienience init * rename badJSON error case Co-authored-by: Tanner <me@tanner.xyz>
tanner0101
added a commit
that referenced
this pull request
Feb 19, 2020
* Added CaseOf Validation with tests Signed-off-by: Mohammad <porooshani@gmail.com> * Changed caseOf to case and improved error messages and updated tests. Signed-off-by: Mohammad <porooshani@gmail.com> * Removed non-CaseIterable support from case(of:) validation. Signed-off-by: Mohammad <porooshani@gmail.com> * Removed unwanted map in error generator Signed-off-by: Mohammad <porooshani@gmail.com> * Improved error Generation. Signed-off-by: Mohammad <porooshani@gmail.com> * Add myself as a maintainer (#2188) * Adds EndpointCache for handling GET resource caching (#2184) * Adds a generic EndpointCache<T> class * Review fixups * Changed internal to private * Changed internal to private * Renamed the error * add EndpointCache tests * add CacheControl convienience init * rename badJSON error case Co-authored-by: Tanner <me@tanner.xyz> * expose methods for hex encoded strings (#2189) * Removed non-CaseIterable support from case(of:) validation. Signed-off-by: Mohammad <porooshani@gmail.com> * Removed unwanted map in error generator Signed-off-by: Mohammad <porooshani@gmail.com> * Improved error Generation. Signed-off-by: Mohammad <porooshani@gmail.com> * Improved description message for case(of:) Signed-off-by: Mohammad <porooshani@gmail.com> Co-authored-by: Joannis Orlandos <joannis@orlandos.nl> Co-authored-by: grosch <scott.grosch@icloud.com> Co-authored-by: Tanner <me@tanner.xyz>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds
EndpointCache
which can be used to handle GET requests which are cache aware.This class is thread-safe and will only cache one copy of the resource per event loop.