|
|
@@ -48,6 +48,8 @@ class Cache
|
|
|
const USER_INFO_KEY = 'user:baseInfo';
|
|
|
const USER_NETWORK_PARENTS = 'user:networkParents';
|
|
|
const USER_RELATION_PARENTS = 'user:relationParents';
|
|
|
+ const PREPARE_USER_NETWORK_PARENTS = 'prepare:user:networkParents';
|
|
|
+ const PREPARE_USER_RELATION_PARENTS = 'prepare:user:relationParents';
|
|
|
const PRE_USER_CREATED_AT_LIST = 'prepare:user:createdAtList_';
|
|
|
const USER_CREATED_AT_LIST = 'user:createdAtList_';
|
|
|
|
|
|
@@ -317,19 +319,20 @@ class Cache
|
|
|
/**
|
|
|
* 获取全部安置网络上级
|
|
|
* @param $userId
|
|
|
+ * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
|
|
|
* @return array|mixed
|
|
|
*/
|
|
|
- public static function getAllNetworkParents($userId){
|
|
|
- return UserNetwork::getAllParentsFromRedis($userId);
|
|
|
+ public static function getAllNetworkParents($userId, $isPrepare=false){
|
|
|
+ return UserNetwork::getAllParentsFromRedis($userId, $isPrepare);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取全部推荐网络的上级
|
|
|
* @param $userId
|
|
|
+ * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
|
|
|
* @return array|mixed
|
|
|
*/
|
|
|
- public static function getAllRelationParents($userId){
|
|
|
- return UserRelation::getAllParentsFromRedis($userId);
|
|
|
+ public static function getAllRelationParents($userId, $isPrepare = false){
|
|
|
+ return UserRelation::getAllParentsFromRedis($userId, $isPrepare);
|
|
|
}
|
|
|
-
|
|
|
}
|