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

Using cache #20

Closed
josejachuf opened this issue Feb 23, 2023 · 2 comments
Closed

Using cache #20

josejachuf opened this issue Feb 23, 2023 · 2 comments

Comments

@josejachuf
Copy link
Contributor

Hi @gi0baro,

Is there any way to use cache without explicitly defining index and read methods?

@gi0baro
Copy link
Member

gi0baro commented Feb 27, 2023

@josejachuf I'm afraid not.

In my experience caching plays quite bad with RESTFul APIs, as the additional complexity needed to clear caches (every time you get a POST/PUT/DELETE you should clear the involved caches) generally makes it not worth the candle.

You can still define index and read one time in a custom RESTModule subclass and re-use it on all the modules you want the cache on.

@josejachuf
Copy link
Contributor Author

I understand,. Thanks @gi0baro

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