Skip to content

sujanshsh/PHP-SQLiteCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PHP-SQLiteCache

Cache small size data using SQLite3 database

Server name is also stored to distinguish localhost and production server

Example Usage

$dc = new DataCache();

$key = 'max';
$value = 103;

$check = $dc->get($key);
if($check['available']) {
    echo $check['value'];
} else {
    echo 'not available<br>';
    $dc->set($key,$value,time()+5); // valid upto 5 secs from now
    echo $dc->get($key)['value'];
}

About

Cache small size data using SQLite3 database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages