Skip to content

Simple and fast caching class that uses the file system for caching

License

Notifications You must be signed in to change notification settings

ardagedikk/basic-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Cache

Simple and fast caching class that uses the file system for caching

Build Status Total Downloads Latest Stable Version License

Features

  • Minifying the source code of the cache file
  • Determining the extension of the cache file
  • Encrypts file names with MD5

Install

composer require ardagedik/basic-cache

Usage

<?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();
?>

Options

// These options are assigned by default
$cache = new BasicCache([
  "path"      => "cache/",
  "expire"    => 60,
  "extension" => ".html"
]);
// Clear all cache files
$cache->clear();

License

MIT

About

Simple and fast caching class that uses the file system for caching

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages