From fec312fdf512838f8f3ea6d510f93d80426edaf2 Mon Sep 17 00:00:00 2001 From: dhawes Date: Thu, 2 Mar 2006 17:05:12 +0000 Subject: [PATCH] removed secondary cache to close bug 4625 --- blocks/rss_client/block_rss_client.php | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index 6dfd879baf549..992d709a44f60 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -11,10 +11,6 @@ * @package base ******************************************************************/ -// Developer's debug assistant - if true then the display string will not cache, only -// the magpie object's built in caching will be used -define('BLOCK_RSS_SECONDARY_CACHE_ENABLED', true); - /** * This class is for a block which defines a block for display on * any Moodle page. @@ -164,16 +160,6 @@ function get_rss_by_id($rssid, $display_description, $shownumentries, $showtitle define('MAGPIE_OUTPUT_ENCODING', current_charset()); // see bug 3107 } - // Check if there is a cached string which has not timed out. - if (BLOCK_RSS_SECONDARY_CACHE_ENABLED && - isset($this->config->{'rssid'. $rssid}) && - isset($this->config->{'rssid'. $rssid .'timestamp'}) && - $this->config->{'rssid'. $rssid .'timestamp'} >= $now - $CFG->block_rss_timeout * 60) { - // If the cached string is not too stale - // use it rather than going any further - return stripslashes_safe($this->config->{'rssid'. $rssid}); - } - $rss_record = get_record('block_rss_client', 'id', $rssid); if (isset($rss_record) && isset($rss_record->id)) { // By capturing the output from fetch_rss this way @@ -262,11 +248,6 @@ function get_rss_by_id($rssid, $display_description, $shownumentries, $showtitle $this->title = $feedtitle; } } - - // store config setting for this rssid so we do not need to read from file each time - $this->config->{'rssid'. $rssid} = addslashes($returnstring); - $this->config->{'rssid'. $rssid .'timestamp'} = $now; - $this->instance_config_save($this->config); return $returnstring; } @@ -284,4 +265,4 @@ function format_title($title,$max=64) { } } } -?> +?> \ No newline at end of file