-
-
Notifications
You must be signed in to change notification settings - Fork 924
Closed
Labels
Description
Hello,
Currently, Api Platform does not ship with any cache warmers.
This typically makes the first request to each route slow as a cache is primed on demand. (hitting one api route does not prime all routes, so the effect is compounded).
I've just been hit by a stampede in production because of this, causing a small outage, so not ideal.
The following classes are candidates for being warmed:
- CachedDocumentMetadataFactory
- CachedPropertyMetadataFactory *
- CachedPropertyNameCollectionFactory *
- CachedResourceMetadataFactory
- CachedResourceNameCollectionFactory
- CachedRouteNameResolver
- CachedSubresourceOperationFactory *
However, this is not so easy.
The starred (*) factories take an array of $options
, which are currently not known in the CLI context, and are provided from the router/current request, and will vary per route.
teohhanhui, kiler129, 0xRomain, nervo and adamelso