lada-cache
lada-cache copied to clipboard
"exclude-tables" configuration not working and throwing error
I am using Spatie's MediaLibrary and when I reference the trait to cache a Model that uses the HasMedia
Interface and InteractsWithMedia
trait, any queries to that model fails to work. This is because the LadaCacheTrait
is not used on the MediaLibrary package referenced above. To go around this, if I understand correctly, there is a configuration on the config file to exclude the table. So I update the config to the following
'exclude-tables' => [
(new \Spatie\MediaLibrary\MediaCollections\Models\Media())->getTable()
],
this doesn't seem to have any effect and the error persists. My understanding from what I see on the readme is that this package should ignore queries that are excluded in the above config.
Error Message
Spiritix\LadaCache\QueryHandler::setBuilder(): Argument #1 ($builder) must be of type Spiritix\LadaCache\Database\QueryBuilder, Illuminate\Database\Query\Builder given
Any reason why this config isn't working?
Version Information
Laravel: v10.22.0 PHP: v8.2 Lada-Cache: Version: v5.3