We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 757fa99 + 7bd1f57 commit 0e31c69Copy full SHA for 0e31c69
docs/examples/mongodb.php
@@ -13,24 +13,25 @@
13
*/
14
15
use Phpfastcache\CacheManager;
16
+use Phpfastcache\Drivers\Mongodb\Config;
17
18
// Include composer autoloader
19
require __DIR__ . '/../../vendor/autoload.php';
20
-$InstanceCache = CacheManager::getInstance('mongodb', [
21
+$InstanceCache = CacheManager::getInstance('mongodb', new Config([
22
'host' => '127.0.0.1',
- 'port' => '27017',
23
+ 'port' => 27017,
24
'username' => '',
25
'password' => '',
- 'timeout' => '1',
26
+ 'timeout' => 1,
27
/**
28
* These ones are
29
* totally optional
30
31
// 'collectionName' => 'Cache',
32
// 'databaseName' => 'phpFastCache'
33
-]);
34
+]));
35
36
37
0 commit comments