- App Version: 2.1
- PHP Version: 8.4
Description
Disabling caching does does not actually disable caching.
Steps To Reproduce
Set the following in config:
'defaults' => [
'features' => [
'caching' => false,
],
],
Then, request any filter multiple times with different values:
// Some XHR calls this e.g. with search=John
return view('dashboard', ['posts' => Post::query()->filter($postFilter)->get()]);
When the filter is called again with search=Jane, the filter doesn't call the filter method and returns ALL Post elements instead of filtering.
Workaround
The issue can be worked around by changing the default cache TTL in the configuration:
'defaults' => [
'cache' => [
'ttl' => 0,
],
],
Description
Disabling caching does does not actually disable caching.
Steps To Reproduce
Set the following in config:
Then, request any filter multiple times with different values:
When the filter is called again with
search=Jane, the filter doesn't call the filter method and returns ALLPostelements instead of filtering.Workaround
The issue can be worked around by changing the default cache TTL in the configuration: