redis添加定时删除时间

This commit is contained in:
wangwei01 2019-07-29 14:29:37 +08:00
parent 72ffbf1a85
commit 291755a48b
4 changed files with 8 additions and 3 deletions

@ -1 +1 @@
Subproject commit 21cbf1616cd145c248452eaf77b1e1c7c14c82bd
Subproject commit 5fb5d7f6fcd174b9c4ad4e30e189e90e2b8c846e

View File

@ -70,7 +70,7 @@ class RankController{
'win_game' => $row['win_times']
));
}
ini_set('memory_limit','3072M');
//击杀榜
$r = $this->getRedis();
$kill_rank_db = $r->get("game2001api: kill_rank");

View File

@ -200,6 +200,7 @@ class ShopController{
}
}
$r->set($shop_uuid, json_encode($user_db));
$r -> pexpire($shop_uuid, 1000 * 3600 * 24);
//增加奖励
$addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id);
@ -269,6 +270,7 @@ class ShopController{
$shop_list = $this->randomShop();
$user_db['shop_list'] = $shop_list;
$r -> set($shop_uuid, json_encode($user_db));
$r -> pexpire($shop_uuid, 1000 * 3600 * 24);
echo json_encode(array(
'errcode' => 0,
'errmsg'=> '',

View File

@ -128,7 +128,7 @@ class TeamController{
'avatar_url' => $_REQUEST['avatar_url'],
));
$r->set(TEAMID_KEY . $team_uuid, json_encode($user_db));
$r -> pexpire(TEAMID_KEY . $team_uuid, 1000 * 600);
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
@ -179,6 +179,7 @@ class TeamController{
}
$r->set(TEAMID_KEY . $team_uuid, json_encode($user_db));
$r -> pexpire(TEAMID_KEY . $team_uuid, 1000 * 600);
}
echo json_encode(array(
'errcode' => 0,
@ -221,6 +222,7 @@ class TeamController{
}
$r->set(TEAMID_KEY . $team_uuid, json_encode($user_db));
$r -> pexpire(TEAMID_KEY . $team_uuid, 1000 * 600);
if (count($user_db['member_list']) == 0) {
$r->del(TEAMID_KEY . $team_uuid, json_encode($user_db));
}
@ -260,6 +262,7 @@ class TeamController{
}
$user_db['auto_fill'] = $_REQUEST['auto_fill'];
$r->set(TEAMID_KEY . $team_uuid, json_encode($user_db));
$r -> pexpire(TEAMID_KEY . $team_uuid, 1000 * 600);
}
echo json_encode(array(
'errcode' => 0,