Skip to content

Commit 39f1d61

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 22edb9e commit 39f1d61

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

745745
Checkout [the dedicated documentation](../create-client/index.md).
746746

747+
## Caching
748+
749+
API Platform supports Caching Metadata out of the box. It uses the Laravel cache system to store that information.
750+
Caching is automatically enabled in production environments (when `APP_DEBUG` is set to `false`).
751+
752+
Calling `php artisan optimize` will cache the metadata and improve the performance of your API drastically.
753+
754+
To clear the cache, use `php artisan optimize:clear`.
755+
747756
## Hooking Your Own Business Logic
748757

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