MDL-54592 cachestore_mongodb: check MongoDB server connection
commit02a5d26bd58ab885dcbc402cef1e31c5bdda2e8e
authorVictor Deniz Falcon <victor@moodle.com>
Mon, 18 Mar 2019 11:11:01 +0000 (18 11:11 +0000)
committerVictor Deniz Falcon <victor@moodle.com>
Mon, 18 Mar 2019 11:11:01 +0000 (18 11:11 +0000)
treee21a781f2ee5a81fa32fd93c931d6b4f1526f2d4
parent2a944b5b418b0e3b321a9783204fb5537f4f100e
MDL-54592 cachestore_mongodb: check MongoDB server connection

The connection to the MongoDB server is checked on the creation and
deletion of a cache store instance. If the connection fails during
creation, the instance is set as not ready. Before deleting a instance,
a new cachestore_mongodb object is created, and connection checked.
There is no reason to check again the connection in the instance_deleted() method.
cache/stores/mongodb/lib.php