BladeOneCacheRedis
Table of Contents
- $cacheRunning : mixed
- $curCacheDuration : mixed
- $curCacheId : mixed
- $curCachePosition : mixed
- $redis : Redis
- $redisBase : mixed
- $redisConnected : mixed
- $redisIP : mixed
- $redisNamespace : mixed
- $redisPort : mixed
- $redisTimeOut : mixed
- $cacheExpired : mixed
- cacheEnd() : mixed
- cacheExpired() : bool
- Returns true if the cache expired (or doesn't exist), otherwise false.
- cacheStart() : mixed
- compileCache() : mixed
- compileEndCache() : mixed
- connect() : mixed
- keyByScope() : mixed
Properties
$cacheRunning
protected
mixed
$cacheRunning
= false
$curCacheDuration
protected
mixed
$curCacheDuration
= ""
$curCacheId
protected
mixed
$curCacheId
= 0
$curCachePosition
protected
mixed
$curCachePosition
= 0
$redis
protected
Redis
$redis
$redisBase
protected
mixed
$redisBase
= 0
$redisConnected
protected
mixed
$redisConnected
= false
$redisIP
protected
mixed
$redisIP
= '127.0.0.1'
$redisNamespace
protected
mixed
$redisNamespace
= 'bladeonecache:'
$redisPort
protected
mixed
$redisPort
= 6379
$redisTimeOut
protected
mixed
$redisTimeOut
= 2.5
$cacheExpired
private
mixed
$cacheExpired
= []
Methods
cacheEnd()
public
cacheEnd() : mixed
Return values
mixed —cacheExpired()
Returns true if the cache expired (or doesn't exist), otherwise false.
public
cacheExpired(string $templateName, string $id, int $scope, int $cacheDuration) : bool
Parameters
- $templateName : string
-
name of the template to use (such hello for template hello.blade.php)
- $id : string
-
(id of cache, optional, if not id then it adds automatically a number)
- $scope : int
-
scope of the cache.
- $cacheDuration : int
-
(duration of the cache in seconds)
Return values
bool —(return if the cache expired)
cacheStart()
public
cacheStart([mixed $id = "" ][, mixed $cacheDuration = 86400 ]) : mixed
Parameters
- $id : mixed = ""
- $cacheDuration : mixed = 86400
Return values
mixed —compileCache()
public
compileCache(mixed $expression) : mixed
Parameters
- $expression : mixed
Return values
mixed —compileEndCache()
public
compileEndCache(mixed $expression) : mixed
Parameters
- $expression : mixed
Return values
mixed —connect()
public
connect([mixed $redisIP = null ][, mixed $redisPort = null ][, mixed $redisTimeOut = null ]) : mixed
Parameters
- $redisIP : mixed = null
- $redisPort : mixed = null
- $redisTimeOut : mixed = null
Return values
mixed —keyByScope()
private
keyByScope(mixed $scope) : mixed
Parameters
- $scope : mixed