PHP code example of erikbooij / cache-scheduler

1. Go to this page and download the library: Download erikbooij/cache-scheduler 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/ */

    

erikbooij / cache-scheduler example snippets


    $schedule = (new Schedule)
        ->ON, 17, 30)
        ->// Create the scheduler, passing it a SystemClock instance to interface with system time
    $scheduler = (new Scheduler(new SystemClock))
        ->setSchedule($schedule)
        ->setExpirationSpread(ExpirationSpread::minutes(30));
    

    $cache->set('cache-key', 'cache-value', $scheduler->calculateTimeToLive(3600));