From d504552074fc20a89544baa01ec4aba3871fb440 Mon Sep 17 00:00:00 2001 From: Aleksei Miheev Date: Sun, 31 Jan 2016 07:59:12 +0000 Subject: [PATCH] Use cache for video lookups (xcache instead of drop-in null eA replacement) --- forum/Sources/Subs.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/forum/Sources/Subs.php b/forum/Sources/Subs.php index 9595b8d..c6d10b9 100644 --- a/forum/Sources/Subs.php +++ b/forum/Sources/Subs.php @@ -1220,7 +1220,7 @@ function parseVideo($matches) { function parseVideoMyspace($url) { $ttl = 3600; - $html = eaccelerator_get($url); + $html = xcache_get($url); if ($html !== NULL) { return $html; } @@ -1238,14 +1238,14 @@ function parseVideoMyspace($url) $html = 'Посмотреть видео'; $ttl = 60; } - eaccelerator_put($url, $html, $ttl); + xcache_set($url, $html, $ttl); return $html; } function parseVideoDailymotion($url) { $ttl = 3600; - $html = eaccelerator_get($url); + $html = xcache_get($url); if ($html !== NULL) { return $html; } @@ -1258,21 +1258,21 @@ function parseVideoDailymotion($url) $html = 'Посмотреть видео'; $ttl = 60; } - eaccelerator_put($url, $html, $ttl); + xcache_set($url, $html, $ttl); return $html; } -function eaccelerator_get($param) { - return NULL; -} - -function eaccelerator_put($param, $value) { - return NULL; -} +#function xcache_get($param) { +# return NULL; +#} +# +#function xcache_set($param, $value) { +# return NULL; +#} function parseVideoYoutube($url) { $ttl = 3600; - $html = eaccelerator_get($url); + $html = xcache_get($url); if ($html !== NULL) { return $html; } @@ -1290,14 +1290,14 @@ function parseVideoYoutube($url) $html = 'Посмотреть видео'; $ttl = 60; } - eaccelerator_put($url, $html, $ttl); + xcache_set($url, $html, $ttl); return $html; } function parseVideoVimeo($url) { $ttl = 3600; - $html = eaccelerator_get($url); + $html = xcache_get($url); if ($html !== NULL) { return $html; } @@ -1310,7 +1310,7 @@ function parseVideoVimeo($url) $html = 'Посмотреть видео'; $ttl = 60; } - eaccelerator_put($url, $html, $ttl); + xcache_set($url, $html, $ttl); return $html; }