Skip to content

[Laravel] Add Caching documentation #2048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions laravel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,15 @@ to make the app usable by people with disabilities.

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

## Caching

API Platform supports Caching Metadata out of the box. It uses the Laravel cache system to store that information.
Caching is automatically enabled in production environments (when `APP_DEBUG` is set to `false`).

Calling `php artisan optimize` will cache the metadata and improve the performance of your API drastically.

To clear the cache, use `php artisan optimize:clear`.

## Hooking Your Own Business Logic

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!
Expand Down