1. Go to this page and download the library: Download thomas-institut/datacache library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thomas-institut / datacache example snippets
class MyDataCache implements DataCache {
// ...
}
$cache = new MyDataCache(...);
class MyCacheAware implements CacheAware {
public function someMethod() {
// ...
if ($this->isCacheInUse()) {
// do something with the cache
$this->getDataCache()->set(...);
}
}
}
$myInstance = new MyCacheWare(...);
$myInstance->setCache($someDataCacheInstanceOrSomeCallable);
$myInstance->useCache();
$myInstance->someMethod(); // cache will be used
$myInstance->doNotUseCache();
$myInstance->someMethod(); // cache will not be used
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.