Optimizing

Just installing the package is enough to make it available.

Installing Redis is one way to enable optimizations. After installing, add to the config.php

  # Same config as in caching, but add to the existing `database` array in the `config.php` file:
  'database' => [
    'redis' => [
        'default' => [
            'host' => 'localhost',
            'port' => 6379,
            'database' => 1,
        ],
    ],
  ],

These can be changed in the env.php file

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

'app' => [
    'env' => '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.

'app' => [
    'debug' => true,
],

Sessions store the logged in users and other information. By default, they're stored on disk.

Sessions can be saved in PHP.

  'session' => [
    'default' => 'apc',
  ],

This doesn't require any configuration on the server side, however, to enable it, add the following to your config.php file:

  'cache' => [
    'default' => 'apc',
  ],

Instead of using PHP APC, you can also use Redis for caching; adding to the config.php file:

  'cache' => [
    'default' => 'redis',
  ],

phpVMS uses asyncronous queues for several tasks, including sending emails and exporting to vaCentral. The default mode is sync, which means the tasks are done in-line.

If you have Redis installed, you can add the following to the config.php file:

  'queue' => [
    'default' => 'redis',
  ],

  # Same config as in caching, but add to the existing `database` array in the `config.php` file:
  'database' => [
    'redis' => [
        'default' => [
            'host' => 'localhost',
            'port' => 6379,
            'database' => 1,
        ],
    ],
  ],