1. Go to this page and download the library: Download area17/edge-flush 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/ */
php
public function afterSave($object, $fields)
{
$this->invalidateCDNCache($object);
parent::afterSave($object, $fields);
}
php
public function getAttribute($key)
{
$this->cacheModelOnCDN($this);
return parent::getAttribute($key);
}
php
CacheControl::setMaxAge(5000); // in seconds
CacheControl::setMaxAge('1 month'); // as a DateTime string period
CacheControl::setSMaxAge('2 weeks');
php
protected function schedule(Schedule $schedule)
{
$schedule->job(new PurgeTags())->everyMinute();
}
php
protected function schedule(Schedule $schedule)
{
$schedule->job(new WarmCache())->everyMinute();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.