-
Notifications
You must be signed in to change notification settings - Fork 57
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
Endpoint Caching While in Dev Mode #185
Comments
👍 Also noticed this For now I used |
Same issue. Nothing helps even when cache is fully disabled. Only through ui when I clean the element-api cache or craft data-cache the response actually updates. The weird thing is, the code is executed normally, and I see the updated data in the logs. But the response the browser receives is still the old one. Tested in Chrome and Firefox, both display the old reponse.
/edit: maybe bit older version of the plugin: Can anyone help on this? |
You could set 'cache' => \craft\helpers\App::devMode(), |
Description
I set up a simple endpoint that is outputting entry data as JSON, everything seems to be working correctly. The only problem is when I make a change to the endpoint in
config/element-api.php
and refresh the endpoint page, the changes are not automatically updated even though I havedevMode
enabled in my environment configuration. I've confirmed it isn't browser-side caching as I have tried manually clearing my browser cache. I have to manually go to Utilities > Caches > Invalidate Data Caches > Element API Responses in the control panel and clear the cache for the changes to show up.Obviously in a development environment this isn't ideal, and Element API shouldn't be caching in Dev Mode.
Here's my code:
Steps to reproduce
devMode
in environmentconfig/element-api.php
Additional info
The text was updated successfully, but these errors were encountered: