Commit c67ed664 authored by liuyuzhen's avatar liuyuzhen

删除缓存

parent e2f657e5
......@@ -51,7 +51,6 @@ class AdvModel extends \DAO\AbstractModel{
public function delAdvCache($positionId){
\Our\Log::getInstance()->write('调用广告位'.$positionId);
\Our\RedisHelper::delCachedFunction(\Redis\Db9\AdvRedisModel::getInstance(), array(&$this, 'getPostionAdv'),array(),array($positionId));
}
......
......@@ -56,6 +56,7 @@ class QmStoreClassModel extends \DAO\AbstractModel{
return false;
}
/**
* 获取店铺可经营的电偶分类信息
* @param $storeId
......@@ -90,4 +91,13 @@ class QmStoreClassModel extends \DAO\AbstractModel{
return $result;
}
/**
* 删除签约店铺缓存
* @param $cityCode
* @throws \Our\Exception
*/
public function delStoreClassesCache($cityCode){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\QmStoreClassRedisModel::getInstance(), array(&$this, 'getStoreClasses'),array(),array($cityCode));
}
}
\ No newline at end of file
......@@ -236,6 +236,10 @@ class StoreModel extends \DAO\AbstractModel
return $stores;
}
public function delStoresCacheByCityCode($cityCode){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getOnlineStores'),array(),array($cityCode));
}
/**
* 获取当前城市对应正在经营店铺列表
* @param $cityCode 当前城市编码
......@@ -251,6 +255,11 @@ class StoreModel extends \DAO\AbstractModel
return $stores;
}
public function deleteExpressStores($field = 'store_id,store_longitude,store_latitude,max_sign_rang,max_sales_rang,store_sales_scope'){
$storeClassCondition = " and express_distribution = 1 ";
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getOnlineStores'),array(array($storeClassCondition, $field)));
}
public function getNearbyStores($cityCode, $storeIds)
{
$condition = " and store_citycode = '" . $cityCode . "' and store_id in (" . implode(',', $storeIds) . ")";
......@@ -258,6 +267,11 @@ class StoreModel extends \DAO\AbstractModel
$returnStores = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getOnlineStores'), array($condition, $field), \Our\ApiConst::oneHour, array($cityCode));
return $returnStores;
}
public function delNearbyStoresCache($cityCode){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getOnlineStores'),array(),array($cityCode));
}
public function getAddress($storeId){
$storeInfo = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$this, 'getInfoById'),array($storeId),\Our\ApiConst::sevenDaySecond,array($storeId));
......
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