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

Public Member Functions

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

Detailed Description

The default implementation that is passed in the Api object when created: it is based on APCU, and therefore requires APCU to be installed on the server.

Member Function Documentation

§ clear()

Prismic\Cache\ApcCache::clear ( )

Clears the whole cache

Returns
void

§ delete()

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

Deletes a cache entry, from its key

Parameters
string$keythe key of the cache entry
Returns
void

§ get()

Prismic\Cache\ApcCache::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\ApcCache::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\ApcCache::set (   $key,
  $value,
  $ttl = 0 
)

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: