PHP code example of slm / cache

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

    

slm / cache example snippets


'slm_cache' => array(
    'cache'  => array(
        'adapter' => array(
            'name'    => 'apc',
            'options' => array('ttl' => 3600),
        ),
    ),
),

'slm_cache' => array(
    'cache'  => 'my-cache-adapter'
),

'slm_cache' => array(
    'cache_prefix' => 'my_cache_prefix_',
);

'slm_cache' => array(
    'routes'  => array(
        'home'  => array(),
        'about' => array(),
    ),
),

'slm_cache' => array(
    'routes'  => array(
        'contact' => array('match_method' => 'GET'),
    ),
),

'slm_cache' => array(
    'routes'  => array(
        'contact' => array('match_method' => 'GET', 'HEAD'),
    ),
),

'slm_cache' => array(
    'routes'  => array(
        'foo' => array(
            'match_route_params' => array('action' => 'bar')
        ),
    ),
),

'slm_cache' => array(
    'routes'  => array(
        'foo' => array(
            'match_route_params' => array('action' => array('bar', 'baz'))
        ),
    ),
),