Simple file system cache library for PHP built on top of PSR-16.

1.0.2 2020-08-09 05:14 UTC

This package is auto-updated.

Last update: 2024-02-09 13:01:07 UTC


PHP Cache library built by PSR-16 simple cache interface

You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package.


  • Run this command: composer require sarahman/simple-filesystem-cache


  • Create a file named test.php in your root directory and add these following codes:

require "vendor/autoload.php";

$cache = new Sarahman\SimpleCache\FileSystemCache(); // the custom cache directory can be set through the parameter.

// Set Cache key.
$data = [
    'sample' => 'data',
    'another' => 'data'

$cache->set('your_custom_key', $data);

// Check cached key exists or not.

// Get Cached key data.
  • then run php test.php

For Documentations