LexikMaintenanceBundle
LexikMaintenanceBundle copied to clipboard
Avoid the database driver to try to create the maintenance table at every request
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}