Skip to content

NullCache, An implementation of PSR-16 `SimpleCache` with `Basic data validation`

Notifications You must be signed in to change notification settings

ihipop/PSR-NullCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NullCache | 中文说明

This Package Is a Null implementation of PSR-16 SimpleCache with Basic data validation

Why this Package ?

There is nothing like NullLogger of PSR-3 in PSR-16/PSR-6

I (Or if you) don't want to write these code every where

//...
if ($this->cache){
    $this->cache->set($key,$value,$ttl);
}
//...
if ($this->cache){
    $this->cache->get($key)
}
//...

Then You need this Package.

And want some Basic data validation ?

PSR-16 have some special InvalidArgumentException to throw when enter with invalid data. You Will have these check if you use These Package,InvalidArgumentException will be thrown when it is necessary , to let you know your problem in earlier.

Usage

composer require ihipop/psr-null-cache

In your __construction or DI container initialization

///...
$logger = new \ihipop\PsrNullCache\SimpleCache\NullCache(false);
///...

CacheInterfaceProxy

Use this trait when you want a quick implementation of PSR CacheInterface quickly via a Proxy class.

About

NullCache, An implementation of PSR-16 `SimpleCache` with `Basic data validation`

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages