PHP code example of ademozmermer / cache
1. Go to this page and download the library: Download ademozmermer/cache 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/ */
ademozmermer / cache example snippets
sh
$options = [
'time' => 120, // 120 saniye yani 2 dakika
'dir' => 'sCache2', // sCache2 klasörü oluşturup buraya yazılsın.
'buffer' => true, // html sayfalarımızın sıkıştırılmasını aktif edelim.
'load' => true, // sayfamızın sonunda load değerimiz görünsün.
'external'=>array('nocache.php','nocache2.php'), // Burada belirttiğiniz sayfalar ( dosyalar ) cachelenmez.
];
$sCache = new sCache($options); // ayarları sınıfımıza gönderip sınıfı çalıştıralım.