Simple and fast caching class that uses the file system for caching
- Minifying the source code of the cache file
- Determining the extension of the cache file
- Encrypts file names with MD5
composer require ardagedik/basic-cache
<?php
require_once('vendor/autoload.php');
use ArdaGedik\BasicCache;
$cache = new BasicCache();
?>
<?php
$cache->start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Basic Cache Example</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
<?php
$cache->end();
?>
// These options are assigned by default
$cache = new BasicCache([
"path" => "cache/",
"expire" => 60,
"extension" => ".html"
]);
// Clear all cache files
$cache->clear();
MIT