-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(entity-client): enable client side cache for entity-client and usage-client #8877
feat(entity-client): enable client side cache for entity-client and usage-client #8877
Conversation
private RestliEntityClient _entityClient; | ||
private EntityRegistry _entityRegistry; | ||
|
||
public final static ImmutableSet<String> EXCLUDED_ASPECTS = ImmutableSet.<String>builder() |
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.
The hydrator is used when writing to datahub usage events. Lineage is known to exceed ES document sizes and is of questionable value for analytics. Excluding various lineage aspects from the DUE entities. The entities themselves are still recorded.
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.
Can we use the Constants.*_ASPECT_NAME static strings here?
@@ -0,0 +1,134 @@ | |||
package com.linkedin.common.client; |
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.
This is the core logic, built on the available Caffeine cache.
Created a client cache for entity-client, enabled on the system-entity-client specifically. Features include per aspect TTL, maximum size (roughly), and cache metrics.
This cache is particularly useful for caching the usage stats calls on search result pages and user information where for a given page load there are multiple calls to fetch the same information.
Checklist