43
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravel キャッシュクリア&最適化

Last updated at Posted at 2019-12-31

本番環境にデプロイする際に必ずやっておきたいキャッシュクリア&最適化です。

キャッシュクリア&最適化

$ composer install --optimize-autoloader --no-dev
$ php artisan optimize:clear
$ php artisan optimize

補足

--optimize-autoloader オプション

本番環境ではオプション付き、開発環境ではオプションなしで運用します。
このコマンドは下記ファイルを生成します。

vendor/composer/autoload_classmap.php
vendor/composer/autoload_files.php
vendor/composer/autoload_namespaces.php
vendor/composer/autoload_psr4.php
vendor/composer/autoload_real.php

optimize

optimize:clear

参考

43
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
43
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?