+--------------------------------------------------------------------+
*/
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
- */
-
/**
* BAO object for civicrm_cache table. This is a database cache and is persisted across sessions. Typically we use
* this to store meta data (like profile fields, custom fields etc).
$dao->component_id = $componentID;
$dao->find();
- $result = array(); // array($path => $data)
+ $result = array();
while ($dao->fetch()) {
$result[$dao->path] = unserialize($dao->data);
}
* (required) The path under which this item is stored.
* @param int $componentID
* The optional component ID (so componenets can share the same name space).
- *
- * @return void
*/
public static function setItem(&$data, $group, $path, $componentID = NULL) {
if (self::$_cache === NULL) {
}
/**
- * Delete all the cache elements that belong to a group OR
- * delete the entire cache if group is not specified
+ * Delete all the cache elements that belong to a group OR delete the entire cache if group is not specified.
*
* @param string $group
* The group name of the entries to be deleted.
* @param string $path
* Path of the item that needs to be deleted.
- * @param bool|\booleab $clearAll clear all caches
- *
- * @return void
+ * @param bool $clearAll clear all caches
*/
public static function deleteGroup($group = NULL, $path = NULL, $clearAll = TRUE) {
$dao = new CRM_Core_DAO_Cache();
/**
* This function takes entries from the session array and stores it in the cache.
+ *
* It also deletes the entries from the $_SESSION object (for a smaller session size)
*
* @param array $names
* (in the case of profile)
* @param bool $resetSession
* Should session state be reset on completion of DB store?.
- *
- * @return void
*/
public static function storeSessionToCache($names, $resetSession = TRUE) {
foreach ($names as $key => $sessionName) {
*/
/**
+ * Restore session from cache.
+ *
* @param string $names
*/
public static function restoreSessionFromCache($names) {
}
/**
- * Do periodic cleanup of the CiviCRM session table. Also delete all session cache entries
- * which are a couple of days old. This keeps the session cache to a manageable size
+ * Do periodic cleanup of the CiviCRM session table.
+ *
+ * Also delete all session cache entries which are a couple of days old.
+ * This keeps the session cache to a manageable size
*
* @param bool $session
* @param bool $table
* @param bool $prevNext
- *
- * @return void
*/
public static function cleanup($session = FALSE, $table = FALSE, $prevNext = FALSE) {
// clean up the session cache every $cacheCleanUpNumber probabilistically
);
$params = array(
- 1 => array(date('Y-m-d H:i:s', time() - $timeIntervalMins * 60), 'String'),
+ 1 => array(
+ date('Y-m-d H:i:s', time() - $timeIntervalMins * 60),
+ 'String',
+ ),
);
foreach ($transactionPages as $trPage) {
$params[] = array("%${trPage}%", 'String');