Skip to content

sanzodown/simple-php-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple cache library for php. It implement both a file and a memory (APCu) cache back-ends.

Installation

As simple as :

composer require sanzodown/simple-php-cache

Usage

Both come with default configuration so if you don't bother, use it.

File cache:

$cache = new FileCache(
    'your/cache/path',
    'youNameFile'
);

Memory cache:

Note that you must have the extension APCu enabled.

$cache = new ApcCache(
    3600, // Time to live
);

Methods:

$cache->set('key', 'Your datas');

$cache->get('test'); // Your datas

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages