Static Public Member Functions | |
static | getModel ($modelIdentifier) |
static | cacheModel (RedBeanModel $model) |
static | forgetModel (RedBeanModel $model) |
static | forgetModelByIdentifier ($modelIdentifier) |
static | forgetAll ($onlyForgetPhpCache=false) |
static | forgetAllByModelType ($modelClassName) |
static | forgetAllModelIdentifiersToModels () |
![]() | |
static | getCachePrefix ($identifier) |
static | setAdditionalStringForCachePrefix ($prefix= '') |
static | getAdditionalStringForCachePrefix () |
static | supportsAndAllowsMemcache () |
static | supportsAndAllowsPhpCaching () |
static | supportsAndAllowsDatabaseCaching () |
Data Fields | |
const | MAX_MODELS_CACHED_IN_MEMORY = 100 |
![]() | |
const | ALLOW_PHP_CACHING = true |
const | ALLOW_MEMCACHE_CACHING = true |
const | ALLOW_DB_CACHING = true |
const | CACHE_VALUE_KEY = 'value' |
const | CACHE_CHECKSUM_KEY = 'checksum' |
Static Public Attributes | |
static | $cacheType = 'M:' |
![]() | |
static | $cacheType = 'Z:' |
Static Protected Member Functions | |
static | supportsAndAllowsMemcacheByModel (RedBeanModel $model) |
static | supportsAndAllowsMemcacheByModelClassName ($modelClassName) |
static | supportsAndAllowsMemcacheByModelIdentifier ($modelIndetifier) |
![]() | |
static | getCacheIncrementValue ($cacheType) |
static | setCacheIncrementValue ($cacheType, $value) |
static | incrementCacheIncrementValue ($cacheType) |
static | isIdentifierCacheIncrementValueName ($identifier) |
static | clearMemcacheCache () |
static | cacheValueAndChecksum ($key, $value) |
static | getCachedValueAndValidateChecksum ($key) |
Additional Inherited Members | |
![]() | |
static | $cacheIncrementValueVariableName = 'CacheIncrementValue' |
static | $additionalStringForCachePrefix = '' |
Caches RedBean models. If caching is configured it the cached models outlive requests. Either way the models are cached in php for the duration of the current request. This allows multiple references to the same cached model, whether it came out of the memcache or not, to reference the same php object.
Definition at line 44 of file RedBeanModelsCache.php.
|
static |
Get a cached model.
Definition at line 55 of file RedBeanModelsCache.php.
|
static |
Cache a model maintaining the in memory model cache to a limited size.
Definition at line 80 of file RedBeanModelsCache.php.
|
static |
Forget a cached model.
Definition at line 103 of file RedBeanModelsCache.php.
|
static |
Forget all cached models.
$onlyForgetPhpCache | is for testing only. It is for artificially creating situations where memcache must be accessed for testing memcache and RedBeanModel serialization. |
Definition at line 128 of file RedBeanModelsCache.php.
|
static |
TODO: Only forget by model.
$modelClassName | - string. |
Definition at line 144 of file RedBeanModelsCache.php.
|
static |
Used for testing purposes if you need to clear out just the php caching.
Definition at line 153 of file RedBeanModelsCache.php.