// 最近更新されたキャラクター
function deleteCacheLastCharacters()
{
- @unlink(CACHE.'views'.DS.'element__character_picture_table');
+ clearCache('element__character_picture_table', 'views', '');
}
// 未ログインホーム
}
// キャラクター
- function deleteCacheCharacter($character_id = null, $deleteViewCache = true)
+ function deleteCacheCharacter($character_id = null, $deleteModelCache = false)
{
- if ($deleteViewCache) {
- @unlink(CACHE.'views'.DS.'chara_shee_characters.php');
- }
+ clearCache('_characters.php', 'views', '');
+ clearCache('_characters_index');
if (!empty($character_id)) {
- $this->deleteCacheCharacterView($character_id, $deleteViewCache);
+ $this->deleteCacheCharacterView($character_id, $deleteModelCache);
@unlink(CACHE.'views'.DS.'element_'.$character_id.'_character_picture_table');
}
// ユーザ
function deleteCacheUser($user_id)
{
- @unlink(CACHE.'views'.DS.'chara_shee_users.php');
+ clearCache('_users_listview');
+
if (!empty($user_id)) {
- @unlink(CACHE.'views'.DS.'chara_shee_users_view_'.$user_id.'.php');
+ clearCache('_users_view_'.$user_id);
@unlink(CACHE.'views'.DS.'element_'.$user_id.'_character_picture_table');
@unlink(CACHE.'views'.DS.'element_'.$user_id.'_character_view');
// システム
function deleteCacheSystem($system_id, $deleteModelCache = false)
{
- @unlink(CACHE.'views'.DS.'chara_shee_systems.php');
+ clearCache('_systems.php', 'views', '');
+ clearCache('_systems_index');
if (!empty($system_id)) {
- @unlink(CACHE.'views'.DS.'chara_shee_systems_view_'.$system_id.'.php');
+ clearCache('_systems_view_'.$system_id);
}
if ($deleteModelCache) {
$this->deleteCacheHome();
$this->deleteCacheCharacter($this->id, false);
+
if (isset($this->data['clearCache'])) {
$this->deleteCacheUser($this->data['clearCache']['user_id']);
$this->deleteCacheSystem($this->data['clearCache']['system_id'], false); // System一覧の更新遅れを修正する場合true