Routes are not cached #384
Replies: 5 comments 3 replies
-
Are you using the package task to cache the routes? |
Beta Was this translation helpful? Give feedback.
-
@masterix21 Thanks for your reply. :) Yes, this is my tasks array:
It's weird, it does not seem to cache the routes, as they aren't included in the bootstrap array. |
Beta Was this translation helpful? Give feedback.
-
Ok, so how could you work the route cache if you instructed your code to use custom routes after the cache task? Finally, I think you like to use a custom cache file for each tenant, but the package cache task creates only one file shared across all tenants: I think you should create a custom one. |
Beta Was this translation helpful? Give feedback.
-
@masterix21 That's actually a valid point, however the service provider now runs on every tenant switch, as I need to be sure a tenant connection exists. Would it be possible to register the provider earlier in the process? Is it possible to create a service provider which runs even on let's say I'm now thinking of two service providers. One that caches all the routes (no defer provider) and one that does all the domain logic. Thanks for helping me, I'm really lost as the routes are listed, but not cached. |
Beta Was this translation helpful? Give feedback.
-
Sure, you can on |
Beta Was this translation helpful? Give feedback.
-
This does not include the routes from
Domain\Foo\Routes\web.php
and/orDomain\Foo\Routes\api.php
. Clearing the cache makes it work again, but I would like to cache the routes.Beta Was this translation helpful? Give feedback.
All reactions