mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
singleton object cache - initial commit
This commit is contained in:
@@ -10,6 +10,7 @@ use Zotlabs\Lib\Enotify;
|
||||
use Zotlabs\Lib\MarkdownSoap;
|
||||
use Zotlabs\Lib\MessageFilter;
|
||||
use Zotlabs\Lib\ThreadListener;
|
||||
use Zotlabs\Lib\ObjCache;
|
||||
use Zotlabs\Lib\IConfig;
|
||||
use Zotlabs\Lib\PConfig;
|
||||
use Zotlabs\Lib\Activity;
|
||||
@@ -4179,6 +4180,15 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL) {
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
$n = q("SELECT count(id) AS total FROM item WHERE mid = '%s'",
|
||||
dbesc($item['mid'])
|
||||
);
|
||||
|
||||
if (!$n[0]['total']) {
|
||||
ObjCache::Delete($item['mid']);
|
||||
ObjCache::Delete($item['mid'], 'diaspora');
|
||||
}
|
||||
|
||||
q("delete from term where oid = %d and otype = %d",
|
||||
intval($item['id']),
|
||||
intval(TERM_OBJ_POST)
|
||||
|
||||
Reference in New Issue
Block a user