kibana/x-pack/plugins/features/server
Pierre Gayvallet 8ce205999a
features plugin: improve capabilities caching (#153743)
## Summary

- Avoid constructing the capabilities passed to core's capability
provider for each request
- Add proper *explicit* lock mechanism to the feature registry
- Some other minor cleanup, probably

#### Before:

(look at the `getFeatureUICapabilities` block)

<img width="1629" alt="CleanShot 2023-03-26 at 09 55 45@2x"
src="https://user-images.githubusercontent.com/1532934/227951476-1edbd2bc-f60b-4529-8c22-ff0d9511b2b8.png">

#### After

<img width="1640" alt="CleanShot 2023-03-27 at 14 58 31@2x"
src="https://user-images.githubusercontent.com/1532934/227951533-dbe675c3-7089-4b36-86a9-584a3e97c860.png">
2023-03-28 10:01:43 +02:00
..
__snapshots__ [Files] Add default file kind (#144803) 2022-11-23 04:37:05 -07:00
feature_privilege_iterator [Cases][ResponseOps] Splitting out cases privileges (#134860) 2022-06-29 10:47:06 -04:00
routes features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
feature_registry.test.ts features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
feature_registry.ts features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
feature_schema.ts [Security][Features] Adds subtext option to Kibana feature and sub-feature controls (#147709) 2023-01-17 15:25:19 -07:00
index.ts fix all violations 2022-04-16 01:37:30 -05:00
mocks.ts features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
oss_features.test.ts fix all violations 2022-04-16 01:37:30 -05:00
oss_features.ts [Files] Add default file kind (#144803) 2022-11-23 04:37:05 -07:00
plugin.test.ts [Files] Add default file kind (#144803) 2022-11-23 04:37:05 -07:00
plugin.ts features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
types.ts Change ContextContainer to lazily initialize providers (#129896) 2022-04-22 13:15:58 +02:00
ui_capabilities_for_features.test.ts Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
ui_capabilities_for_features.ts fix all violations 2022-04-16 01:37:30 -05:00