Prismic.io PHP kit  3.0.0
Public Member Functions | List of all members
Prismic\Cache\NoCache Class Reference
Inheritance diagram for Prismic\Cache\NoCache:

Public Member Functions

 has ($key)
 
 get ($key)
 
 set ($key, $value, $ttl=null)
 
 delete ($key)
 
 clear ()
 

Detailed Description

A cache implementation that doesn't cache anything; to be passed as the $cache parameter of Prismicget when you don't want any caching. This documentation right here introduces what the functions are supposed to do if there is a cache involved, even though in this class in particular, they all simply do nothing and return false.

Member Function Documentation

§ clear()

Prismic\Cache\NoCache::clear ( )

Clears the whole cache

Returns
void

§ delete()

Prismic\Cache\NoCache::delete (   $key)

Deletes a cache entry, from its key

Parameters
string$keythe key of the cache entry
Returns
void

§ get()

Prismic\Cache\NoCache::get (   $key)

Returns the value of a cache entry from its key

Parameters
string$keythe key of the cache entry
Returns
mixed the value of the entry, as it was passed to CacheInterface::set, null if not present in cache

§ has()

Prismic\Cache\NoCache::has (   $key)

Tests whether the cache has a value for a particular key

Parameters
string$keythe key of the cache entry
Returns
boolean true if the cache has a value for this key, otherwise false

§ set()

Prismic\Cache\NoCache::set (   $key,
  $value,
  $ttl = null 
)

Stores a new cache entry

Parameters
string$keythe key of the cache entry
\stdClass$valuethe value of the entry
int$ttlthe time until this cache entry expires
Returns
void

The documentation for this class was generated from the following file: