File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ As Fast To Implement As Opening a Beer
271271
272272
273273``` bash
274- composer require phpFastCache/phpFastCache
274+ composer require phpfastcache/phpfastcache
275275```
276276
277277#### :construction : Step 2: Setup your website code to implement the phpFastCache calls (with Composer)
Original file line number Diff line number Diff line change 4848 echo $ CachedString ->get ();
4949
5050} else {
51- $ CachedString ->set ("Files Cache --> Cache Enabled --> Well done ! " );
52- $ InstanceCache ->save ($ CachedString );
53-
5451 echo "READ FROM CACHE // " ;
5552 echo "\n EXPIRATION DATE: " . $ CachedString ->getExpirationDate ()->format (DateTime::W3C );
5653 echo $ CachedString ->get ();
5754}
5855
59- echo '<br /><br /><a href="/">Back to index</a> -- <a href="./ ' . basename (__FILE__ ) . '">Reload</a> ' ;
56+ echo '<br /><br /><a href="/">Back to index</a> -- <a href="./ ' . basename (__FILE__ ) . '">Reload</a> ' ;
Original file line number Diff line number Diff line change 1313 */
1414
1515use Phpfastcache \CacheManager ;
16+ use Phpfastcache \Drivers \Mongodb \Config ;
1617
1718// Include composer autoloader
1819require __DIR__ . '/../../vendor/autoload.php ' ;
1920
20- $ InstanceCache = CacheManager::getInstance ('mongodb ' , [
21+ $ InstanceCache = CacheManager::getInstance ('mongodb ' , new Config ( [
2122 'host ' => '127.0.0.1 ' ,
22- 'port ' => ' 27017 ' ,
23+ 'port ' => 27017 ,
2324 'username ' => '' ,
2425 'password ' => '' ,
25- 'timeout ' => ' 1 ' ,
26+ 'timeout ' => 1 ,
2627 /**
2728 * These ones are
2829 * totally optional
2930 */
3031 // 'collectionName' => 'Cache',
3132 // 'databaseName' => 'phpFastCache'
3233
33- ]);
34+ ])) ;
3435
3536
3637/**
You can’t perform that action at this time.
0 commit comments