Skip to content
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

Flush user cache #4314

Closed
wants to merge 5 commits into from
Closed

Conversation

dlin2028
Copy link

@dlin2028 dlin2028 commented May 3, 2024

Description

Currently, our system only allows for the invalidation of the entire user authentication cache, which can lead to numerous cache misses and inefficiencies. This change is required to allow for more precise cache management, specifically targeting stale cache entries at the individual user level without disrupting the cache state of other users

  • Category: New feature
  • Why these changes are required?
    Currently, our system only allows for the invalidation of the entire user authentication cache. This change is required to allow for more precise cache management, specifically targeting stale cache entries at the individual user level without disrupting the cache state of other users.
  • What is the old behavior before changes and new behavior after changes?
    Previously, invalidating a user's cache required clearing the entire cache, affecting all users. The new behavior introduces an endpoint that allows for the invalidation of cache entries on a per-user basis, thereby maintaining cache integrity for other users and reducing unnecessary cache misses.

Issues Resolved

#2829

Testing

Unit testing was written in FlushCacheApiTest.java

Check List

  • [X ] New functionality includes testing
  • New functionality has been documented
  • [ X] Commits are signed per the DCO using --signoff


import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;

public class FlushCacheApiTest extends AbstractRestApiUnitTest {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move the test into integration-tests

@DarshitChanpura
Copy link
Member

@dlin2028 Is this being worked on actively?

@dlin2028
Copy link
Author

@DarshitChanpura No. I think someone else took this one.
#4571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants