aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2009-12-20 14:31:37 +0000
committerAndreas Fischer <bantu@phpbb.com>2009-12-20 14:31:37 +0000
commit183045072f04f907aebc4e932a847123ac8a9019 (patch)
tree5b4e3a5aa2e6afb68df3179f5ce31207c598ce0a
parentd64516057fef276a9ba435bd20e7223015376a95 (diff)
downloadforums-183045072f04f907aebc4e932a847123ac8a9019.tar
forums-183045072f04f907aebc4e932a847123ac8a9019.tar.gz
forums-183045072f04f907aebc4e932a847123ac8a9019.tar.bz2
forums-183045072f04f907aebc4e932a847123ac8a9019.tar.xz
forums-183045072f04f907aebc4e932a847123ac8a9019.zip
Cache forever, destroy on change.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10354 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/feed.php8
-rw-r--r--phpBB/includes/acp/acp_board.php5
2 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php
index 63c3fe083f..ea7ad243d8 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -562,8 +562,8 @@ class phpbb_feed_base
global $db, $cache;
static $forum_ids;
+ // Matches acp/acp_board.php
$cache_name = 'feed_excluded_forum_ids';
- $cache_ttl = 300;
if (!isset($forum_ids) && ($forum_ids = $cache->get('_' . $cache_name)) === false)
{
@@ -579,7 +579,7 @@ class phpbb_feed_base
}
$db->sql_freeresult($result);
- $cache->put('_' . $cache_name, $forum_ids, $cache_ttl);
+ $cache->put('_' . $cache_name, $forum_ids);
}
return $forum_ids;
@@ -1046,8 +1046,8 @@ class phpbb_feed_news extends phpbb_feed_base
global $db, $cache;
static $forum_ids;
+ // Matches acp/acp_board.php
$cache_name = 'feed_news_forum_ids';
- $cache_ttl = 300;
if (!isset($forum_ids) && ($forum_ids = $cache->get('_' . $cache_name)) === false)
{
@@ -1063,7 +1063,7 @@ class phpbb_feed_news extends phpbb_feed_base
}
$db->sql_freeresult($result);
- $cache->put('_' . $cache_name, $forum_ids, $cache_ttl);
+ $cache->put('_' . $cache_name, $forum_ids);
}
return $forum_ids;
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 9f0bcf210f..534fa1059b 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -29,6 +29,7 @@ class acp_board
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $cache;
$user->add_lang('acp/board');
@@ -268,7 +269,6 @@ class acp_board
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'feed_limit' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
- 'feed_overall_forums_limit' => array('lang' => 'ACP_FEED_OVERALL_FORUMS_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
'feed_overall_topics' => array('lang' => 'ACP_FEED_OVERALL_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_overall_topics_limit' => array('lang' => 'ACP_FEED_OVERALL_TOPIC_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
@@ -469,6 +469,9 @@ class acp_board
// Store news and exclude ids
if ($mode == 'feed' && $submit)
{
+ $cache->destroy('_feed_news_forum_ids');
+ $cache->destroy('_feed_excluded_forum_ids');
+
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
}