mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:50:20 +00: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
|
@ -1019,7 +1019,8 @@ function prepare_body($item,$attach = false) {
|
|||
$a = get_app();
|
||||
call_hooks('prepare_body_init', $item);
|
||||
|
||||
$cachefile = get_cachefile($item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']));
|
||||
//$cachefile = get_cachefile($item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']));
|
||||
$cachefile = get_cachefile($item["guid"]."-".hash("md5", $item['body']));
|
||||
|
||||
if (($cachefile != '')) {
|
||||
if (file_exists($cachefile))
|
||||
|
@ -1027,6 +1028,7 @@ function prepare_body($item,$attach = false) {
|
|||
else {
|
||||
$s = prepare_text($item['body']);
|
||||
file_put_contents($cachefile, $s);
|
||||
logger('prepare_body: put item '.$item["id"].' into cachefile '.$cachefile);
|
||||
}
|
||||
} else
|
||||
$s = prepare_text($item['body']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue