Optimizing

These can be changed in the env.php file

When going live, this should be set to production. By default, it's dev.

This adjusts the logging level, making it more verbose. The default value is true, and should be set to false when you're live/in-production.


Changing these driver settings can help optimize where caches and other data is stored.

Where the session files are stored (e.g, logged in users, flash messages). In the env.php, the following line can be set to different options:

SESSION_DRIVER=file
  • file - Sessions are written to files in the storage/framework/cache folder
  • database - Sessions are saved to the sessions table in the database (not recommended)

Where the cache files are stored. This includes caching of Repository and Model queries.

CACHE_DRIVER=array
CACHE_PREFIX=phpvms
  • array - Cache is only stored for the duration of the request, amounts to basically none

If you're in a shared environment or your server has multiple apps, changing the CACHE_PREFIX is probably a good idea to avoid collisions and errors.

This sets where queued tasks are stored, for asyncronous tasks.

QUEUE_DRIVER=database
  • database - The jobs table stored queued tasks