mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:45:16 +02:00
Preloading of items in the cache when receiving them.
This commit is contained in:
parent
452ff19d73
commit
82c00660e0
6 changed files with 38 additions and 10 deletions
|
@ -757,6 +757,15 @@ function item_post(&$a) {
|
|||
// update filetags in pconfig
|
||||
file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
|
||||
|
||||
// Store the fresh generated item into the cache
|
||||
$cachefile = get_cachefile($datarray["guid"]."-".hash("md5", $datarray['body']));
|
||||
|
||||
if (($cachefile != '') AND !file_exists($cachefile)) {
|
||||
$s = prepare_text($datarray['body']);
|
||||
file_put_contents($cachefile, $s);
|
||||
logger('mod_item: put item '.$r[0]['id'].' into cachefile '.$cachefile);
|
||||
}
|
||||
|
||||
if($parent) {
|
||||
|
||||
// This item is the last leaf and gets the comment box, clear any ancestors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue