PHP Classes

File: samples/redis.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Cache Object   samples/redis.php   Download  
File: samples/redis.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:
Date: 2 years ago
Size: 206 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\Redis());

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