relocate the cache class

This commit is contained in:
redmatrix
2016-06-23 05:18:58 -07:00
parent 2a32713dfc
commit e5c66d94f2
5 changed files with 52 additions and 73 deletions

View File

@@ -1,6 +1,8 @@
<?php /** @file */
use Zotlabs\Lib as Zlib;
function oembed_replacecb($matches){
$embedurl=$matches[1];
@@ -130,7 +132,7 @@ function oembed_fetch_url($embedurl){
$txt = null;
if($action !== 'block') {
$txt = Cache::get(App::$videowidth . $embedurl);
$txt = Zlib\Cache::get('[' . App::$videowidth . '] ' . $embedurl);
if(strstr($txt,'youtu') && strstr(z_root(),'https:')) {
$txt = str_replace('http:','https:',$txt);
@@ -199,7 +201,7 @@ function oembed_fetch_url($embedurl){
//save in cache
if(! get_config('system','oembed_cache_disable'))
Cache::set(App::$videowidth . $embedurl,$txt);
Zlib\Cache::set('[' . App::$videowidth . '] ' . $embedurl,$txt);
}