1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

Cache forever, destroy on change.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10354 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Andreas Fischer
2009-12-20 14:31:37 +00:00
parent d64516057f
commit 183045072f
2 changed files with 8 additions and 5 deletions

View File

@@ -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;