Skip to content

mag310/simple-file-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple File Cache

Simple file`s cache component, implementing PSR-16

Installation

  • Run this command: composer require mag310/simple-file-cache

Usages

Simple example

        $cache = new FileCache();

        $cache->set('custom_key', 'sample data');
        $data = $cache->get('custom_key');
        $cache->delete('custom_key');

Using categories:

    $category = 'category';
    $cache = new FileCache();

    $cache->set($category . '/key1', 'data1');
    $cache->set($category . '/key2', 'data2');

    $cache->delete($category);

For Documentations

psr/simple-cache-implementation

Running Tests

We are using PHPUnit for testing the module. Do the following:

  • Run ./vendor/bin/phpunit

About

Simple file`s cache component, implementing PSR-16

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages