]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: remove memcache support
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 20 Jan 2010 10:28:30 +0000 (13:28 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 20 Jan 2010 10:28:30 +0000 (13:28 +0300)
functions.php

index 9d51df53e06b21dde010bae795b6de21ae6f1794..8436f2154b27e8b8f8b56d71083caa1954def85a 100644 (file)
                        error_reporting(0);
                }
 
-               $obj_id = md5("FEEDOBJ:$fetch_url");
-
-               if ($memcache && $obj = $memcache->get($obj_id)) {
-                       if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
-                               _debug("update_rss_feed: data found in memcache [$obj_id]");
-                       }
-                       $rss = $obj;
+               if (!$use_simplepie) {
+                       $rss = fetch_rss($fetch_url);
                } else {
+                       if (!is_dir(SIMPLEPIE_CACHE_DIR)) {
+                               mkdir(SIMPLEPIE_CACHE_DIR);
+                       }
 
-                       if (!$use_simplepie) {
-                               $rss = fetch_rss($fetch_url);
-                       } else {
-                               if (!is_dir(SIMPLEPIE_CACHE_DIR)) {
-                                       mkdir(SIMPLEPIE_CACHE_DIR);
-                               }
-       
-                               $rss = new SimplePie();
-                               $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT);
-       #                       $rss->set_timeout(10);
-                               $rss->set_feed_url($fetch_url);
-                               $rss->set_output_encoding('UTF-8');
-       
-                               if (SIMPLEPIE_CACHE_IMAGES && $cache_images) {
-                                       if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
-                                               _debug("enabling image cache");
-                                       }
-       
-                                       $rss->set_image_handler('./image.php', 'i');
-                               }
-       
+                       $rss = new SimplePie();
+                       $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT);
+#                      $rss->set_timeout(10);
+                       $rss->set_feed_url($fetch_url);
+                       $rss->set_output_encoding('UTF-8');
+
+                       if (SIMPLEPIE_CACHE_IMAGES && $cache_images) {
                                if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
-                                       _debug("feed update interval (sec): " .
-                                               get_feed_update_interval($link, $feed)*60);
+                                       _debug("enabling image cache");
                                }
-       
-                               if (is_dir(SIMPLEPIE_CACHE_DIR)) {
-                                       $rss->set_cache_location(SIMPLEPIE_CACHE_DIR);
-                                       $rss->set_cache_duration(get_feed_update_interval($link, $feed) * 60);
-                               }
-       
-                               $rss->init();
+
+                               $rss->set_image_handler('./image.php', 'i');
                        }
-       
-                       if ($rss && $memcache) $memcache->add($obj_id, $rss, MEMCACHE_COMPRESSED, 300);
+
+                       if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
+                               _debug("feed update interval (sec): " .
+                                       get_feed_update_interval($link, $feed)*60);
+                       }
+
+                       if (is_dir(SIMPLEPIE_CACHE_DIR)) {
+                               $rss->set_cache_location(SIMPLEPIE_CACHE_DIR);
+                               $rss->set_cache_duration(get_feed_update_interval($link, $feed) * 60);
+                       }
+
+                       $rss->init();
                }
+       
 
 //             print_r($rss);