Commit 8258053c authored by hujun's avatar hujun

有效期

parent 71c05233
...@@ -28,11 +28,13 @@ class RedisCacheService ...@@ -28,11 +28,13 @@ class RedisCacheService
private $rule_key = 'cache_rule_'; private $rule_key = 'cache_rule_';
private $site_city_key = 'cache_site_city_'; private $site_city_key = 'cache_site_city_';
private $time; private $time;
private $max_time;
public function __construct() public function __construct()
{ {
$this->redis_ext = RedisExt::getRedis(); $this->redis_ext = RedisExt::getRedis();
$this->time = 1800; //2天 $this->time = 1800; //30分钟
$this->max_time = 2592000; //30天
} }
/** /**
...@@ -189,7 +191,7 @@ class RedisCacheService ...@@ -189,7 +191,7 @@ class RedisCacheService
$m_agent_phone = new AAgentsPhone(); $m_agent_phone = new AAgentsPhone();
$data['phone_list'] = $m_agent_phone->getAgentsByWhereColumn(['agents_id'=>$data['id'], 'status'=>0], 'phone'); $data['phone_list'] = $m_agent_phone->getAgentsByWhereColumn(['agents_id'=>$data['id'], 'status'=>0], 'phone');
$data['phone_list'][] = $data['phone']; $data['phone_list'][] = $data['phone'];
$this->setRedisCache($this->agent_key . $agent_id, $data); $this->setRedisCache($this->agent_key . $agent_id, $data, $this->agent_time);
} }
return $data; return $data;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment