mirror of
https://github.com/friendica/friendica
synced 2025-04-27 04:30:11 +00:00
Relocated the cache code.
This commit is contained in:
parent
2dc5f1aefc
commit
1a75503b1c
3 changed files with 20 additions and 22 deletions
|
@ -1480,16 +1480,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
|||
if (!$deleted AND !$dontcache) {
|
||||
|
||||
// Store the fresh generated item into the cache
|
||||
$cachefile = get_cachefile(urlencode($arr["guid"])."-".hash("md5", $arr['body']));
|
||||
|
||||
if (($cachefile != '') AND !file_exists($cachefile)) {
|
||||
$s = prepare_text($arr['body']);
|
||||
$a = get_app();
|
||||
$stamp1 = microtime(true);
|
||||
file_put_contents($cachefile, $s);
|
||||
$a->save_timestamp($stamp1, "file");
|
||||
logger('item_store: put item '.$current_post.' into cachefile '.$cachefile);
|
||||
}
|
||||
put_item_in_cache($arr);
|
||||
|
||||
$r = q('SELECT * FROM `item` WHERE id = %d', intval($current_post));
|
||||
if (count($r) == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue