CrossPHP

FileCache
in package
implements RequestCacheInterface

Tags
author

wonli wonli@live.com

Class FileCache

Interfaces, Classes and Traits

RequestCacheInterface
Interface CacheInterface

Table of Contents

$cacheKey  : string
$cachePath  : string
$config  : array<string|int, mixed>
$driver  : FileCacheDriver
$expireTime  : int
缓存过期时间(秒)
__construct()  : mixed
FileCache constructor.
get()  : mixed
获取缓存内容
getConfig()  : mixed
获取缓存配置
isValid()  : bool
是否有效
set()  : void
写入缓存
setConfig()  : mixed
缓存配置

Properties

$config

private array<string|int, mixed> $config

$expireTime

缓存过期时间(秒)

private int $expireTime = 3600

Methods

__construct()

FileCache constructor.

public __construct(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>
Tags
throws
CoreException
Return values
mixed

get()

获取缓存内容

public get() : mixed
Return values
mixed

get cache

getConfig()

获取缓存配置

public getConfig() : mixed
Return values
mixed

isValid()

是否有效

public isValid() : bool
Return values
bool

set()

写入缓存

public set(string $value) : void
Parameters
$value : string
Tags
throws
CoreException
Return values
void

setConfig()

缓存配置

public setConfig([array<string|int, mixed> $config = [] ]) : mixed
Parameters
$config : array<string|int, mixed> = []
Return values
mixed

Search results