PHP Classes

File: samples/disk.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Cache Object   samples/disk.php   Download  
File: samples/disk.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Cache Object
Save and load variable values in cache containers
Author: By
Last change: default ttl sample disk
Date: 2 years ago
Size: 216 bytes
 

Contents

Class file image Download
<?php
require_once __DIR__.'/../vendor/autoload.php';

$object = [1,2,3,4];

$cache = new \BABA\Cache\Cache(new \BABA\Cache\Drivers\Disk(), 3600 * 24);

$cache->store('test', $object);
var_dump($cache->load('test'));