$v) { if (strpos($Key, $k) !== false && !check_perms($v)) { error(403); } } } } View::show_header('Cache key management'); //Make sure the form was sent if (isset($_GET['cache'])) { if ($_GET['cache'] === 'artists') { $max = $DB->scalar("SELECT max(ArtistID) as count FROM artists_group"); for ($i = 1; $i <= $max; $i++) { $Cache->deleteMulti(['artist_' . $i, 'artist_groups_' . $i]); } echo "
All artist caches flushed.
"; } elseif ($_GET['cache'] === 'torrent_groups') { $max = $DB->scalar("SELECT max(ID) as count FROM torrents_group"); for ($i = 1; $i <= $max; $i++) { $Cache->deleteMulti(['torrent_group_' . $i, 'groups_artists_' . $i]); } echo "
All torrent caches flushed.
"; } elseif ($_GET['cache'] === 'users') { $max = $DB->scalar("SELECT max(ID) as count FROM users_main"); for ($i = 1; $i <= $max; $i++) { $Cache->deleteMulti(['inbox_new_' . $i, 'user_stats_' . $i, 'user_info_' . $i, 'user_info_heavy_' . $i, 'donor_info_' . $i]); } echo "
All user caches flushed.
"; } } if (isset($Keys) && $_GET['type'] == 'clear') { foreach ($Keys as $Key) { if (preg_match('/(.*?)(\d+)\.\.(\d+)$/', $Key, $Matches) && is_number($Matches[2]) && is_number($Matches[3])) { for ($i = $Matches[2]; $i <= $Matches[3]; $i++) { $Cache->delete_value($Matches[1].$i); } } else { $Cache->delete_value($Key); } } echo '
Key(s) ' . implode(', ', array_map('display_str', $Keys)) . ' flushed.
'; } $MultiKeyTooltip = 'Enter cache keys delimited by whitespace.'; ?>

View or flush cache keys

Key

Multi-key

Flush application caches: Artists (flushes artist_* and artist_groups_*)
Torrent Groups (flushes torrent_group_* and groups_artists_*)
Users (flushes donor_info_*, inbox_new_*, user_info_*, and user_info_heavy_*, user_stats_*)
get_value($Key); ?>
no value