Skip to content

[7.x] [Search Sessions] Client side search cache (#92439)#97376

Merged
kibanamachine merged 1 commit intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-92439
Apr 16, 2021
Merged

[7.x] [Search Sessions] Client side search cache (#92439)#97376
kibanamachine merged 1 commit intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-92439

Conversation

@kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

* dev docs

* sessions tutorial

* title

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Code review

* client cache

* mock utils

* improve code

* Use cacheOnClient in Lens

* mock

* docs and types

* unit tests!

* Search response cache + tests

* remove cacheOnClient
evict cache on error

* test ts

* shouldCacheOnClient + improve tests

* remove unused

* clear subs

* dont unsubscribe on setItem

* caching mess

* t

* fix jest

* add size to bfetch response @ppisljar
use it to reduce the # of stringify in response cache

* ts

* ts

* docs

* simplify abort controller logic and extract it into a class

* docs

* delete unused tests

* use addAbortSignal

* code review

* Use shareReplay, fix tests

* code review

* bfetch test

* code review

* Leave the bfetch changes out

* docs + isRestore

* make sure to clean up properly

* Make sure that aborting in cache works correctly
Clearer restructuring of code

* fix test

* import

* code review round 1

* ts

* Added functional test for search request caching

* test

* skip before codefreeze

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Apr 16, 2021
@kibanamachine kibanamachine enabled auto-merge (squash) April 16, 2021 17:02
@kibanamachine
Copy link
Contributor Author

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataEnhanced 98 104 +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 943.7KB 943.7KB +51.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 791.1KB 791.3KB +193.0B
dataEnhanced 24.7KB 35.1KB +10.4KB
total +10.6KB
Unknown metric groups

API count

id before after diff
data 3457 3459 +2

API count missing comments

id before after diff
data 2965 2967 +2

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @lizozom

@kibanamachine kibanamachine merged commit 90c6fda into elastic:7.x Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants