7 public static function get($key){
8 $r = q("SELECT `v` FROM `cache` WHERE `k`='%s'",
12 if (count($r)) return $r[0]['v'];
16 public static function set($key,$value) {
17 q("INSERT INTO `cache` VALUES ('%s','%s','%s')",
20 dbesc(datetime_convert()));
23 public static function clear(){
24 q("DELETE FROM `cache` WHERE `updated` < '%s'",
25 dbesc(datetime_convert('UTC','UTC',"now - 30 days")));