I had an apex method with @AuraEnabled(cacheable=true)
and a wire method in LWC, all was working fine.
Then to meet the new requirement I was experimenting with @AuraEnabled(cacheable=false)
. With this config the LWC refused to run the apex method with this error:
{
"status": 500,
"body": {
"message": "Apex methods that are to be cached must be marked as @AuraEnabled(cacheable=true)"
},
"headers": {}
}
I set it back to (cacheable=true)
but the 500 error is still appearing, I tried hard refresh, closing the browser but it doesn't not help.
What can I do to get the original behavior back?