include/SugarCache/SugarCacheAbstract.php
\SugarCacheAbstract
Abstract cache class
- Children
- \SugarCacheZend
- \SugarCacheAPC
- \SugarCacheRedis
- \SugarCacheMemory
- \SugarCachesMash
- \SugarCacheMemcache
- \SugarCacheFile
- \SugarCacheMemcached
- \SugarCacheWincache
- Api
Properties
\records
$_cacheExternalHits= '0'
0
Details- Type
- \records
\records
$_cacheLocalHits= '0'
0
Details- Type
- \records
\records
$_cacheMisses= '0'
0
Details- Type
- \records
\records
$_cacheRequests= '0'
0
Details- Type
- \records
\timeout
$_expireTimeout= '300'
300
Details- Type
- \timeout
\prefix
$_keyPrefix= ''sugarcrm_''
'sugarcrm_'
Details- Type
- \prefix
\stores
$_localStore= 'array()'
array()
Details- Type
- \stores
\indicates
$_priority= '899'
899
Details- Type
- \indicates
Methods
__get(
string $key
)
:
mixed
PHP's magic __get() method, used here for getting the current value from the cache.
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed |
__isset(
string $key
)
:
mixed
PHP's magic __isset() method, used here for checking for a key in the cache.
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed |
__set(
string $key, $value
)
:
mixed
PHP's magic __set() method, used here for setting a value for a key in the cache.
Name | Type | Description |
---|---|---|
$key | string | |
$value |
Type | Description |
---|---|
mixed |
__toString(
)
:
string
Returns what backend is used for caching, uses normalized class name for lookup
Type | Description |
---|---|
string |
__unset(
string $key
)
:
mixed
PHP's magic __unset() method, used here for clearing a key in the cache.
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed |
_clearExternal(
string $key
)
:
void
Hook for the child implementations of the individual backends to provide thier own logic for clearing a value out of thier cache
Name | Type | Description |
---|---|---|
$key | string |
_getExternal(
string $key
)
:
mixed
Hook for the child implementations of the individual backends to provide thier own logic for getting a value from cache
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed | $value, returns null if the key is not in the cache |
_resetExternal(
)
:
void
Hook for the child implementations of the individual backends to provide thier own logic for clearing thier cache out fully
_setExternal(
string $key, mixed $value
)
:
void
Hook for the child implementations of the individual backends to provide thier own logic for setting a value from cache
Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
getCacheStats(
)
:
array
Returns the number of cache hits made
Type | Description |
---|---|
array | assocative array with each key have the value |
getPriority(
)
:
int
Returns the priority level for this backend
Type | Description |
---|---|
int |
- See
- \self::$_priority
set(
$key, $value, $ttl
=
null
)
:
void
Set a value for a key in the cache, optionally specify a ttl. A ttl value of zero will indicate that a value should only be stored per the request.
Name | Type | Description |
---|---|---|
$key | ||
$value | ||
$ttl |