include/SugarCache/SugarCacheAbstract.php
\SugarCacheAbstract
Abstract cache class
- Children
- \SugarCacheZend
- \SugarCacheAPC
- \SugarCacheRedis
- \SugarCacheMemory
- \SugarCachesMash
- \SugarCacheMemcache
- \SugarCacheFile
- \SugarCacheMemcached
- \SugarCacheWincache
- Api
Properties

\records
$_cacheExternalHits= '0'
0Details- Type
- \records

\records
$_cacheLocalHits= '0'
0Details- Type
- \records

\records
$_cacheMisses= '0'
0Details- Type
- \records

\records
$_cacheRequests= '0'
0Details- Type
- \records

\timeout
$_expireTimeout= '300'
300Details- Type
- \timeout

\prefix
$_keyPrefix= ''sugarcrm_''
'sugarcrm_'Details- Type
- \prefix

\stores
$_localStore= 'array()'
array()Details- Type
- \stores

\indicates
$_priority= '899'
899Details- Type
- \indicates
Methods

__get(
string $key
)
:
mixedPHP'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
)
:
mixedPHP'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
)
:
mixedPHP'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(
)
:
stringReturns what backend is used for caching, uses normalized class name for lookup
| Type | Description |
|---|---|
| string |

__unset(
string $key
)
:
mixedPHP's magic __unset() method, used here for clearing a key in the cache.
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| mixed |

_clearExternal(
string $key
)
:
voidHook 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
)
:
mixedHook 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(
)
:
voidHook for the child implementations of the individual backends to provide thier own logic for clearing thier cache out fully

_setExternal(
string $key, mixed $value
)
:
voidHook 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(
)
:
arrayReturns the number of cache hits made
| Type | Description |
|---|---|
| array | assocative array with each key have the value |

getPriority(
)
:
intReturns the priority level for this backend
| Type | Description |
|---|---|
| int |
- See
- \self::$_priority

set(
$key, $value, $ttl
=
null
)
:
voidSet 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 |