Public Member Functions | |
LFSWorldSQLCache ($params) | |
get ($params) | |
save ($data, $params) | |
requiresDataReload () | |
purgeOld ($params) | |
createKey () | |
getLastUpdate ($params) | |
_countRows ($params, $threshold) | |
Protected Member Functions | |
_createPaginationData ($params, $totalRows) | |
_stringify ($array) | |
_escape ($string) | |
Protected Attributes | |
$m_aDefaults |
Definition at line 16 of file lfsworldsqlcache.php.
|
LFSWorldSQLCache Ctor.
Definition at line 42 of file lfsworldsqlcache.php. References array_merge_replace(). |
|
Gets the total entry count within a specified threshold.
Definition at line 209 of file lfsworldsqlcache.php. Referenced by get(). |
|
Creates an array of meta data that makes it easier to paginate results.
Definition at line 231 of file lfsworldsqlcache.php. Referenced by get(). |
|
Escape a astring to be safely included in a query.
Definition at line 275 of file lfsworldsqlcache.php. Referenced by _stringify(). |
|
Takes an array of values, escapes them for SQL insertion and converts them to a string.
Definition at line 262 of file lfsworldsqlcache.php. References _escape(). Referenced by save(). |
|
Creates a unique key for the data provided.
Definition at line 172 of file lfsworldsqlcache.php. |
|
Retrieve data from the cache.
Definition at line 54 of file lfsworldsqlcache.php. References _countRows(), _createPaginationData(), and array_merge_replace(). |
|
Returns the last update of the last cache fetched.
Definition at line 184 of file lfsworldsqlcache.php. References array_merge_replace(). Referenced by purgeOld(). |
|
Purges entries older than the threshold from the cache. Be warned that setting the purge threshold too low will render the fallback feature of interfaces useless.
Definition at line 158 of file lfsworldsqlcache.php. References getLastUpdate(). |
|
Returns a boolean indicating whether LFSWorldFileCache::get should be called immediately after a save.
Definition at line 145 of file lfsworldsqlcache.php. |
|
Save data to the cache.
Definition at line 111 of file lfsworldsqlcache.php. References _stringify(). |
|
Initial value: array( 'lifeTime' => 60, 'noValidityCheck' => false, 'queries' => array( 'count' => 'SELECT COUNT(lastUpdate) AS rowCount FROM {{table}} WHERE lastUpdate >= {{threshold}}', 'get' => 'SELECT * FROM {{table}} WHERE lastUpdate >= {{threshold}} {{where}} {{limit}} {{order}}', 'save' => 'REPLACE INTO {{table}} {{fields}} VALUES {{values}}', 'oldThreshold' => 'SELECT DISTINCT lastUpdate FROM {{table}} ORDER BY lastUpdate DESC LIMIT 1, 1'), 'resultsPerPage' => 0, 'page' => 1, 'getTransformer' => '', 'saveTransformer' => '', 'where' => '', 'order' => '') Definition at line 22 of file lfsworldsqlcache.php. |