Skip to content

Osekai/osekai-caching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

osekai-caching

Caching system for osekai - by @hubza

Requirements

Made to be used in conjunction osekai-db : https://github.com/osekai/osekai-db

Setup

  • Set up osekai-db
  • Include osekaiCache.php
  • Import table.sql into database

And you're good to go!

Usage

Caching database response for 2 hours

$cache = getCache("medals");
if($cache != null) {
    echo $cache;
    exit;
}

$medals = Database::execSimpleSelect("SELECT * FROM Medals");
$response = json_encode($medals);
echo $medals;
Caching::saveCache("medals", 7200, $response);

About

caching system for osekai - by @Hubza

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages