include/SugarCache/SugarCache.php

Show: inherited
Table of Contents

Functions

functioncheck_cache( ) : void

Internal -- Determine if there is an external cache available for use.

Details
Deprecated
 
functionexternal_cache_retrieve_helper( \unknown_type $key ) : \unknown

Internal -- This function actually retrieves information from the caches.

It is a helper function that provides that actual cache API abstraction.

Parameters
Name Type Description
$key \unknown_type
Returns
Type Description
\unknown
Details
Deprecated
 
See
\sugar_cache_retrieve  
functionsugar_cache_clear( String $key ) : void

Clear a key from the cache. This is used to invalidate a single key.

Parameters
Name Type Description
$key String

-- Key from global namespace

functionsugar_cache_put( String $key, \Serializable $value,  $ttl = null ) : void

Put a value in the cache under a key

Parameters
Name Type Description
$key String

-- Global namespace cache. Key for the data.

$value \Serializable

-- The value to store in the cache.

$ttl
functionsugar_cache_reset( ) : void

Turn off external caching for the rest of this round trip and for all round trips for the next cache timeout. This function should be called when global arrays are affected (studio, module loader, upgrade wizard, ... ) and it is not ok to wait for the cache to expire in order to see the change.

functionsugar_cache_reset_full( ) : void

Flush the cache in its entirety including the local and external store along with the opcodes.

functionsugar_cache_retrieve( String $key ) : \The

Retrieve a key from cache. For the Zend Platform, a maximum age of 5 minutes is assumed.

Parameters
Name Type Description
$key String

-- The item to retrieve.

Returns
Type Description
\The item unserialized
functionsugar_cache_validate( ) : true

This function is called once an external cache has been identified to ensure that it is correctly working.

Returns
Type Description
true for success, false for failure.
Details
Deprecated
 
functionsugar_clean_opcodes( ) : void

Clean out whatever opcode cache we may have out there.

\SugarCache

Package: SugarCRM

Sugar Cache manager

Api
 

Constants

Constant  EXTERNAL_CACHE_NULL_VALUE = "SUGAR_CACHE_NULL_ZZ"

Properties

Propertyprotected  $_cacheInstance= ''
static
Details
Type
n/a
Propertypublictrue  $isCacheReset= 'false'
static

if the cache has been reset during this request, so we no longer return values from cache until the next reset
Default valuefalseDetails
Type
true

Methods

methodprivate__construct( ) : void

methodprotected_init( ) : void
static

initializes the cache in question

methodpubliccleanOpcodes( ) : void
static

Try to reset any opcode caches we know about

Details
Todo
make it so developers can extend this somehow  
methodpublicinstance( ) : void
static

Returns the instance of the SugarCacheAbstract object, cooresponding to the external cache being used.

Documentation was generated by DocBlox 0.18.1.