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

How to capture request to edit the toggle feature state in the console? #791

Open
AlvesF5 opened this issue Jun 9, 2022 · 3 comments
Open

Comments

@AlvesF5
Copy link

AlvesF5 commented Jun 9, 2022

I'm using togglz in a Spring boot application, I have an endpoind in one of my controllers that fetches all the toggles in the database with a status equal to true. I'm using cache to store the result of the search and not stress the database, however, every time the state of a toggle is changed in the database I need to invalidate this cache, but I wouldn't like to have to implement the StateRepository interface for that, I would like to somehow intercept the request that is made by the console and invalidate the cache based on that intercept.

@bennetelli
Copy link
Member

Is that actually a performance bottleneck? To be honest, I have never seen someone having performance problems with fetching the feature state.

It's a while ago since I used it, but maybe the actuator endpoint is the better way to do that?

@bennetelli
Copy link
Member

I just opened a new issue I will work on soon: #801

@bennetelli
Copy link
Member

@AlvesF5 what about the CachingStateRepository? Shouldn't this do your job?

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

No branches or pull requests

2 participants