Memcache
    
            
            in package
            
        
    
            
            implements
                            RequestCacheInterface                    
    
    
        
        
    
    Tags
Interfaces, Classes and Traits
- RequestCacheInterface
- Interface CacheInterface
Table of Contents
- $cacheKey : string
- 缓存key
- $config : array<string|int, mixed>
- $driver : MemcacheDriver
- $expireTime : int
- 有效时间
- $flag : int
- __construct() : mixed
- Memcache constructor.
- get() : array<string|int, mixed>|string
- 获取request缓存
- getConfig() : mixed
- 获取缓存配置
- isValid() : bool
- 查看key是否有效
- set() : void
- 设置request缓存
- setConfig() : mixed
- 设置配置
Properties
$cacheKey
缓存key
    protected
        string
    $cacheKey
    
        
    
$config
    protected
        array<string|int, mixed>
    $config
    
        
    
$driver
    protected
        MemcacheDriver
    $driver
    
        
    
$expireTime
有效时间
    protected
        int
    $expireTime
     = 3600
        
    
$flag
    protected
        int
    $flag
     = 0
        
    
Methods
__construct()
Memcache constructor.
    public
                __construct(array<string|int, mixed> $option) : mixed
        
        Parameters
- $option : array<string|int, mixed>
Tags
Return values
mixed —get()
获取request缓存
    public
                get(int &$flag) : array<string|int, mixed>|string
        
        Parameters
- $flag : int
Return values
array<string|int, mixed>|string —getConfig()
获取缓存配置
    public
                getConfig() : mixed
        
    
    
        Return values
mixed —isValid()
查看key是否有效
    public
                isValid() : bool
        
    
    
        Return values
bool —set()
设置request缓存
    public
                set(string $value) : void
        
        Parameters
- $value : string
Return values
void —setConfig()
设置配置
    public
                setConfig([array<string|int, mixed> $config = [] ]) : mixed
        
        Parameters
- $config : array<string|int, mixed> = []