PHP code example of sme / cacher

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

    

sme / cacher example snippets


Cacher::setDir(__DIR__.'/.cache/');

Cacher::put('message', 'Hello World!', 60);

Cacher::get('message');

Cacher::pull('message');

Cacher::forget('message');

Cacher::has('message');

cacher()->put('message2', 'world hello', 180);

cacher()->get('message2');