Hubert Cache Extension
Installation
Hubert is available via Composer:, (*1)
{
"require": {
"falkm/hubert-cache": "1.*"
}
}
Usage
Create an index.php file with the following contents:, (*2)
<?php
require 'vendor/autoload.php';
$app = new hubert\app();
$config = array(
"factories" => array(
"cache" => array(hubert\extension\cache\factory::class, 'get')
),
"config" => array(
"display_errors" => true,
"cache" => array(
"path" => __dir__.'/cache/',
)
),
"routes" => array(
"home" => array(
"route" => "/",
"method" => "GET|POST",
"target" => function($request, $response, $args){
hubert()->cache->set("test", "hubert");
echo hubert()->cache->get("test");
})
),
);
hubert($config);
hubert()->core()->run();
For more see the example in this repository., (*3)
components
License
The MIT License (MIT). Please see License File for more information., (*4)