LexikMaintenanceBundle icon indicating copy to clipboard operation
LexikMaintenanceBundle copied to clipboard

Avoid the database driver to try to create the maintenance table at every request

Open SebastienTainon opened this issue 9 years ago • 0 comments

Currently, at every request on the application, the database driver tries to create the table maintenance :

CREATE TABLE IF NOT EXISTS %s (ttl %s DEFAULT NULL)\

This causes quite a lot of unnecessary requests to the database on a huge traffic infrastructure. I suggest to add an option to the configuration that basically says that the table is created, in which case we do not try to create it again. It can be used like this:

 driver:
      class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver'
      options: {table_created: true}

SebastienTainon avatar Aug 29 '16 16:08 SebastienTainon