|
@@ 161-163 (lines=3) @@
|
| 158 |
|
*/ |
| 159 |
|
public function cacheObject($o) |
| 160 |
|
{ |
| 161 |
|
if (\PHPDaemon\Core\Daemon::$config->logevents->value) { |
| 162 |
|
\PHPDaemon\Core\Daemon::log(__METHOD__ . '(' . json_encode($o) . ')'); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
if (isset($o['_key'])) { |
| 166 |
|
$this->cache->set($o['_key'], bson_encode($o)); |
|
@@ 186-188 (lines=3) @@
|
| 183 |
|
*/ |
| 184 |
|
public function deleteObject($o) |
| 185 |
|
{ |
| 186 |
|
if (\PHPDaemon\Core\Daemon::$config->logevents->value) { |
| 187 |
|
\PHPDaemon\Core\Daemon::log(__METHOD__ . '(' . json_encode($o) . ')'); |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
$this->cache->get('_id.' . ((string)$o['_id']), |
| 191 |
|
function ($mc) use ($o) { |