-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Server side caching implementation for the Index Pattern api #5575
Closed
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
…code to the client
…re are no existing indices that match the pattern
…ense to put it in a template pattern
Adding a 'suites' property to the existing intern configuration caused an error to be thrown at the beginning of the functional test run. Even if the value of 'suites' was just an empty array. The existence of the property seemed to enabled execution of the config file in the selenium browser because it complained about not having the node require function. To fix this, I created a separate api test config file without the node require and removed the 'suites' property from intern.js.
… improve testability
…cept and return single objects
Merged
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.
Requires #5213
When an index pattern is requested via the API it pulls field mappings directly from the matching indices if no index template exists. This is done to avoid having duplicate data in the .kibana index pattern, but retrieving all of these mappings can be a costly operation if there a many indices and many fields in each index. We can't rely on browser caching because we need to be able to invalidate the cache any time an update is made. To keep things fast, let's cache the normalized index-pattern resources that we're returning to clients when they GET them from the API.
At the moment this PR is a rough proof of concept showing how we could use Hapi and its support for catbox to easily cache these responses server side.