projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4789 from totten/master-test-tx
[civicrm-core.git]
/
CRM
/
Utils
/
Cache
/
APCcache.php
diff --git
a/CRM/Utils/Cache/APCcache.php
b/CRM/Utils/Cache/APCcache.php
index 9bd6765068b61231e1bff2fc27bca1c6c454fda8..cfa49286b946bdf480187efec22c43ca9c437ead 100644
(file)
--- a/
CRM/Utils/Cache/APCcache.php
+++ b/
CRM/Utils/Cache/APCcache.php
@@
-1,7
+1,7
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
5
|
+ | CiviCRM version 4.
6
|
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
@@
-57,9
+57,9
@@
class CRM_Utils_Cache_APCcache {
/**
* Constructor
*
/**
* Constructor
*
- * @param array
$config
an array of configuration params
+ * @param array
$config
an array of configuration params
*
*
- * @return
void
+ * @return
\CRM_Utils_Cache_APCcache
*/
function __construct(&$config) {
if (isset($config['timeout'])) {
*/
function __construct(&$config) {
if (isset($config['timeout'])) {
@@
-70,6
+70,12
@@
class CRM_Utils_Cache_APCcache {
}
}
}
}
+ /**
+ * @param $key
+ * @param $value
+ *
+ * @return bool
+ */
function set($key, &$value) {
if (!apc_store($this->_prefix . $key, $value, $this->_timeout)) {
return FALSE;
function set($key, &$value) {
if (!apc_store($this->_prefix . $key, $value, $this->_timeout)) {
return FALSE;
@@
-77,10
+83,20
@@
class CRM_Utils_Cache_APCcache {
return TRUE;
}
return TRUE;
}
+ /**
+ * @param $key
+ *
+ * @return mixed
+ */
function &get($key) {
return apc_fetch($this->_prefix . $key);
}
function &get($key) {
return apc_fetch($this->_prefix . $key);
}
+ /**
+ * @param $key
+ *
+ * @return bool|string[]
+ */
function delete($key) {
return apc_delete($this->_prefix . $key);
}
function delete($key) {
return apc_delete($this->_prefix . $key);
}