数据缓存处理
This commit is contained in:
@@ -194,7 +194,7 @@ class User extends Model
|
|||||||
$cache_key = 'user_base_info_'.$uid;
|
$cache_key = 'user_base_info_'.$uid;
|
||||||
$user_info = json_decode(Cache::get($cache_key));
|
$user_info = json_decode(Cache::get($cache_key));
|
||||||
|
|
||||||
if($user_info){
|
if(!$user_info){
|
||||||
$user_info = db::name('user')
|
$user_info = db::name('user')
|
||||||
->field('id as user_id,nickname,avatar,sex,mobile,market_value,user_code as code')
|
->field('id as user_id,nickname,avatar,sex,mobile,market_value,user_code as code')
|
||||||
->where('id', $uid)->find();
|
->where('id', $uid)->find();
|
||||||
|
|||||||
Reference in New Issue
Block a user