cache embeds in the background on initial storage rather than on first access

This commit is contained in:
zotlabs
2019-01-29 15:14:49 -08:00
parent 753f137575
commit b15421826d
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php /** @file */
namespace Zotlabs\Daemon;
class Cache_embeds {
static public function run($argc,$argv) {
if(! $argc == 2)
return;
$c = q("select body from item where id = %d ",
dbesc(intval($argv[1]))
);
if(! $c)
return;
$item = $c[0];
// bbcode conversion by default processes embeds that aren't already cached.
// Ignore the returned html output.
bbcode($item['body']);
}
}