Skip to content

Commit bcf13c6

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

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
@@ -849,6 +849,15 @@ to make the app usable by people with disabilities.
849849

850850
Checkout [the dedicated documentation](../create-client/index.md).
851851

852+
## Caching
853+
854+
API Platform supports Caching Metadata out of the box. It uses the Laravel cache system to store that information.
855+
Caching is automatically enabled in production environments (when `APP_DEBUG` is set to `false`).
856+
857+
Calling `php artisan optimize` will cache the metadata and improve the performance of your API drastically.
858+
859+
To clear the cache, use `php artisan optimize:clear`.
860+
852861
## Hooking Your Own Business Logic
853862

854863
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)