Skip to content

Commit 036d616

Browse files
committed
feat(laravel): add topic about caching
Document how metedata is cached and when Signed-off-by: Tobias Oitzinger <[email protected]>
1 parent a05b89a commit 036d616

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

laravel/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,15 @@ to make the app usable by people with disabilities.
683683

684684
Checkout [the dedicated documentation](../create-client/index.md).
685685

686+
## Caching
687+
688+
API Platform supports Caching Metadata out of the box. It uses the Laravel cache system to store that information.
689+
Caching is automatically enabled in production environments (when `APP_DEBUG` is set to `false`).
690+
691+
Calling `php artisan optimize` will cache the metadata and improve the performance of your API drastically.
692+
693+
To clear the cache, use `php artisan optimize:clear`.
694+
686695
## Hooking Your Own Business Logic
687696

688697
Now that you learned the basics, be sure to read [the general design considerations](../core/design.md) and [how to extend API Platform](../core/extending.md) to understand how API Platform is designed, and how to hook your custom business logic!

0 commit comments

Comments
 (0)