Help us understand the problem. What is going on with this article?

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

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

キャッシュクリア

$ composer dump-autoload -o
$ php artisan optimize:clear
$ php artisan optimize

補足

composer dump-autoload -o

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

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:clear

optimize:clear は下記のコマンドを実行します。

$ php artisan view:clear
$ php artisan cache:clear
$ php artisan route:clear
$ php artisan config:clear
$ php artisan clear-compiled

optimize

optimize は下記のコマンドを実行します。

$ php artisan config:cache
$ php artisan route:cache
ucan-lab
Backend Developer at ROLO. I love PHP and I'm focusing on Laravel, Docker, GraphQL.
https://u-can.pro
yyphp
PHPerが毎週集まり、ざっくばらんに情報交換する雑談コミュニティ
https://yyphp.connpass.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした