This cache store does not support tagging
mybigman opened this issue · 4 comments
Hi,
Latest update breaks.
This cache store does not support tagging
in Repository.php line 391
at Repository->tags(array('acl')) in CacheManager.php line 301
at CacheManager->__call('tags', array(array('acl'))) in Facade.php line 237
at CacheManager->tags(array('acl')) in Facade.php line 237
at Facade::__callStatic('tags', array(array('acl'))) in HasRole.php line 39
at Cache::tags(array('acl')) in HasRole.php line 39
at User->getRoles() in HasRole.php line 91
"Cache tags are not supported when using the file or database cache drivers"
I am using file.
Thanks.
Please, I just encountered this issue with version kodeine/laravel-acl: "^2.0"
on Laravel ^8.12
.
I tried doing something like this:
$user = User::find(auth()->user()->id);
then
$user->getRoles();
this is the line with the error
Please, how do I fix this?
Can you please paste error stack?
[2021-03-16 03:36:02] local.ERROR: This cache store does not support tagging. {"userId":1,"exception":"[object] (BadMethodCallException(code: 0): This cache store does not support tagging. at /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:483) [stacktrace] #0 /home/vagrant/code/escuela/vendor/stancl/tenancy/src/CacheManager.php(33): Illuminate\\Cache\\Repository->tags() #1 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Stancl\\Tenancy\\CacheManager->__call() #2 /home/vagrant/code/escuela/vendor/kodeine/laravel-acl/src/Kodeine/Acl/Traits/HasRole.php(50): Illuminate\\Support\\Facades\\Facade::__callStatic() #3 /home/vagrant/code/escuela/vendor/kodeine/laravel-acl/src/Kodeine/Acl/Traits/HasRole.php(97): App\\Models\\User->getRoles() #4 /home/vagrant/code/escuela/vendor/kodeine/laravel-acl/src/Kodeine/Acl/Middleware/HasPermission.php(77): App\\Models\\User->hasRole() #5 /home/vagrant/code/escuela/vendor/kodeine/laravel-acl/src/Kodeine/Acl/Middleware/HasPermission.php(47): Kodeine\\Acl\\Middleware\\HasPermission->hasRole() #6 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Kodeine\\Acl\\Middleware\\HasPermission->handle() #7 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #8 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle() #9 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #10 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle() #11 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #12 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle() #13 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #14 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle() #15 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #16 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest() #17 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle() #18 /home/vagrant/code/escuela/vendor/stancl/tenancy/src/Middleware/IdentificationMiddleware.php(36): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #19 /home/vagrant/code/escuela/vendor/stancl/tenancy/src/Middleware/InitializeTenancyByDomain.php(38): Stancl\\Tenancy\\Middleware\\IdentificationMiddleware->initializeTenancy() #20 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Stancl\\Tenancy\\Middleware\\InitializeTenancyByDomain->handle() #21 /home/vagrant/code/escuela/vendor/stancl/tenancy/src/Middleware/PreventAccessFromCentralDomains.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #22 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Stancl\\Tenancy\\Middleware\\PreventAccessFromCentralDomains->handle() #23 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #24 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle() #25 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #26 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle() #27 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #28 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\\Pipeline\\Pipeline->then() #29 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Routing/Router.php(670): Illuminate\\Routing\\Router->runRouteWithinStack() #30 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute() #31 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute() #32 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\\Routing\\Router->dispatch() #33 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #34 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #35 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #36 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #37 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #38 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #39 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle() #40 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #41 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle() #42 /home/vagrant/code/escuela/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #43 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle() #44 /home/vagrant/code/escuela/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #45 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle() #46 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #47 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then() #48 /home/vagrant/code/escuela/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #49 /home/vagrant/code/escuela/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle() #50 {main} "}