Memcache extends AbstractAdapter
Table of Contents
- $memcache : object
 - Store the object.
 - $ttl : int
 - Time to live.
 - __construct() : mixed
 - __construct.
 - close() : void
 - Close the connection.
 - deleteItem() : self
 - Delete the cache.
 - destroy() : self
 - Remove all caches.
 - getItem() : mixed
 - Get value form the cache.
 - getItemTtl() : int|false
 - Get the time-to-live for an item in cache.
 - getTtl() : int
 - Get the time-to-live for cache.
 - getVersion() : string
 - Get the version of memcache.
 - hasItem() : bool
 - Determine if cache exists.
 - memcache() : object
 - Get the memcache object.
 - saveItem() : self
 - Save an item to cache.
 - setTtl() : self
 - Set the ttl.
 
Properties
$memcache
Store the object.
    private
        object
    $memcache
    
        
    
    Tags
$ttl
Time to live.
    private
        int
    $ttl
     = 0
        
    
    Tags
Methods
__construct()
__construct.
    public
                __construct(string $host, int $port, int $ttl) : mixed
        
        Parameters
- $host : string
 - 
                    
Host of memcache
 - $port : int
 - 
                    
Port of memcache
 - $ttl : int
 - 
                    
Time to live
 
Tags
Return values
mixed —close()
Close the connection.
    public
                close() : void
        
    
    
    Tags
Return values
void —deleteItem()
Delete the cache.
    public
                deleteItem(string $key) : self
        
        Parameters
- $key : string
 
Tags
Return values
self —destroy()
Remove all caches.
    public
                destroy() : self
        
    
    
    Tags
Return values
self —getItem()
Get value form the cache.
    public
                getItem(string $key) : mixed
        
        Parameters
- $key : string
 
Tags
Return values
mixed —getItemTtl()
Get the time-to-live for an item in cache.
    public
                getItemTtl(sstring $key) : int|false
        
        Parameters
- $key : sstring
 
Tags
Return values
int|false —getTtl()
Get the time-to-live for cache.
    public
                getTtl() : int
        
    
    
    Tags
Return values
int —getVersion()
Get the version of memcache.
    public
                getVersion() : string
        
    
    
    Tags
Return values
string —hasItem()
Determine if cache exists.
    public
                hasItem(string $key) : bool
        
        Parameters
- $key : string
 
Tags
Return values
bool —memcache()
Get the memcache object.
    public
                memcache() : object
        
    
    
    Tags
Return values
object —saveItem()
Save an item to cache.
    public
                saveItem(string $key, mixed $value[, int $ttl = null ]) : self
        
        Parameters
- $key : string
 - $value : mixed
 - $ttl : int = null
 
Tags
Return values
self —setTtl()
Set the ttl.
    public
                setTtl(int $ttl) : self
        
        Parameters
- $ttl : int
 - 
                    
time to live