Add the creation date to the cache tables

This commit is contained in:
Michael Vogel 2016-01-15 00:58:57 +01:00
parent d5e1f33506
commit 268467fe04
3 changed files with 8 additions and 4 deletions

View file

@ -75,8 +75,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
else { //save in cache
$j = json_decode($txt);
if ($j->type != "error")
q("INSERT INTO `oembed` (`url`, `content`) VALUES ('%s', '%s')",
dbesc(normalise_link($embedurl)), dbesc($txt));
q("INSERT INTO `oembed` (`url`, `content`, `created`) VALUES ('%s', '%s', '%s')",
dbesc(normalise_link($embedurl)), dbesc($txt), dbesc(datetime_convert()));
Cache::set($a->videowidth . $embedurl,$txt, CACHE_DAY);
}