diff --git a/src/application/controller/login.php b/src/application/controller/login.php index 5c9712b..2db25b0 100644 --- a/src/application/controller/login.php +++ b/src/application/controller/login.php @@ -80,7 +80,8 @@ if (isset($_POST) && $_POST) { $_SESSION['userName'] = $userName; $_SESSION['userId'] = $userId; - $_memcache->flush(); + $_memcache->delete('api.user.profile.' . $userName); + $_memcache->delete('api.user.avatar.' . $userName); // Redirect header('Location: ' . PROJECT_HOST, true, 302); diff --git a/src/application/controller/logout.php b/src/application/controller/logout.php index e1ae647..dc264a7 100644 --- a/src/application/controller/logout.php +++ b/src/application/controller/logout.php @@ -3,9 +3,10 @@ if (isset($_SESSION['userName'])) { - session_destroy(); + $_memcache->delete('api.user.profile.' . $_SESSION['userName']); + $_memcache->delete('api.user.avatar.' . $_SESSION['userName']); - $_memcache->flush(); + session_destroy(); } header('Location: ' . PROJECT_HOST, true, 302); \ No newline at end of file