include/SugarCache/SugarCacheRedis.php
\SugarCacheRedis
Redis SugarCache backend, using the PHP Redis C library at http://github.com/nicolasff/phpredis
- Parent(s)
- \SugarCacheAbstract
Properties

\records
$_cacheExternalHits= '0'
0Details- Type
- \records
- Inherited_from
- \SugarCacheAbstract::$$_cacheExternalHits

\records
$_cacheLocalHits= '0'
0Details- Type
- \records
- Inherited_from
- \SugarCacheAbstract::$$_cacheLocalHits

\records
$_cacheMisses= '0'
0Details- Type
- \records
- Inherited_from
- \SugarCacheAbstract::$$_cacheMisses

\records
$_cacheRequests= '0'
0Details- Type
- \records
- Inherited_from
- \SugarCacheAbstract::$$_cacheRequests

\timeout
$_expireTimeout= '300'
300Details- Type
- \timeout
- Inherited_from
- \SugarCacheAbstract::$$_expireTimeout

\prefix
$_keyPrefix= ''sugarcrm_''
'sugarcrm_'Details- Type
- \prefix
- Inherited_from
- \SugarCacheAbstract::$$_keyPrefix

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

\indicates
$_priority= '920'
920Details- Type
- \indicates
- See
- \SugarCacheAbstract::$_priority

\set
$useLocalStore= 'true'
trueDetails- Type
- \set
- Inherited_from
- \SugarCacheAbstract::$$useLocalStore
Methods

__get(
string $key
)
:
mixedPHP's magic __get() method, used here for getting the current value from the cache.
Inherited from: \SugarCacheAbstract::__get()| 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.
Inherited from: \SugarCacheAbstract::__isset()| 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.
Inherited from: \SugarCacheAbstract::__set()| Name | Type | Description |
|---|---|---|
| $key | string | |
| $value |
| Type | Description |
|---|---|
| mixed |

__toString(
)
:
stringReturns what backend is used for caching, uses normalized class name for lookup
Inherited from: \SugarCacheAbstract::__toString()| Type | Description |
|---|---|
| string |

__unset(
string $key
)
:
mixedPHP's magic __unset() method, used here for clearing a key in the cache.
Inherited from: \SugarCacheAbstract::__unset()| 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 |

_fixKeyName(
string $key
)
:
stringFixed the key naming used so we don't have any spaces
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| string | fixed key name |

_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(
)
:
array
| Type | Description |
|---|---|
| array | assocative array with each key have the value |

getPriority(
)
:
intReturns the priority level for this backend
Inherited from: \SugarCacheAbstract::getPriority()| 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.
Inherited from: \SugarCacheAbstract::set()| Name | Type | Description |
|---|---|---|
| $key | ||
| $value | ||
| $ttl |