Replies: 2 comments
-
|
Hey @boryn the |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Sammyjo20! Yes, putting public function __construct()
{
$this->disableCaching();
}On the other hand I believe disabling caching should automatically invoke clearing the cache. Now, let's have this scenario:
IMHO in the step 7 when the cache got disabled we should remove the cache record, so that when we run step 9 and 10, it should get response from the fresh call and save it to the cache (instead of servicing a stale cache record). Additionaly, setting this: public function __construct()
{
$this->disableCaching();
$this->invalidateCache();
}does not remove cache record at all, so either it's a bug, or I run it in a wrong order, but at this moment I have no idea how to clear the existing cache record :) Using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I know there is possbility to disable cache on a per-request basis (like
$request->disableCaching();).But I'm looking for a way to disable it within the request class. I tried to put
$this->disableCaching();in an overriddenboot()method, but it did not help.Why? Actually I may cache results on the development environment only, and cache cannot be used in production. That's why I'm looking for something like:
Beta Was this translation helpful? Give feedback.
All reactions