LoginSignup
0
1

More than 3 years have passed since last update.

Google App Engine x Laravel でroute:cache config:cacheを使う

Posted at

キャッシュしてサイト高速化がしたかった

php artisan config:cache
php artisan route:cache

しかし、サイトにアクセスするとエラーになる

Read-onlyの場所に書き込みがあったぞ的な。

PHP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/workspace/storage/dxcea6x78780x7e92x554x5f6dxade76x0c0x0ce.php): failed to open stream: Read-only file system in /workspace/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:135

app.yamlに追記すれば解決

app.yaml
APP_SERVICES_CACHE: /tmp/services.php
APP_PACKAGES_CACHE: /tmp/packages.php
APP_CONFIG_CACHE: /tmp/config.php
APP_ROUTES_CACHE: /tmp/routes.php

無事、キャッシュ利用してサイト高速化ができました。
参考サイト:https://kido0617.github.io/php/2019-12-17-service-env/

0
1
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
0
1