PHP Classes

File: example/indexCache.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq   PHP Simple Cache Library   example/indexCache.php   Download  
File: example/indexCache.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Simple Cache Library
Access data in different types of cache containers
Author: By
Last change:
Date: 6 years ago
Size: 373 bytes
 

Contents

Class file image Download
<?php


//load the cache file
require_once 'init.php';

/* file system cache */
$cache = new Lablnet\Cache();

//file name
$name = 'newfile';

//create the cache
$cache->create($name);

//store the values deleted after 1 hour
$cache->store($name, 'dsdsd', 'Hello World', 3600);

//get the value
var_dump($cache->load($name));

//delete the cache
$cache->delete('newfile');