|
|
@@ -102,7 +102,7 @@ class CacheModel extends Model
|
|
|
}
|
|
|
}
|
|
|
$cache_key = implode("_", $arg_list);
|
|
|
- return "models:".$cache_key;
|
|
|
+ return "models:" . $cache_key;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -201,17 +201,13 @@ class CacheModel extends Model
|
|
|
*/
|
|
|
public function getCacheFunc($funcName, $id = '')
|
|
|
{
|
|
|
- $cache_key = $this->getCacheKey($funcName, $id);
|
|
|
- $data = $this->getCache($cache_key);
|
|
|
- if (!$data) {
|
|
|
- $arg_list = func_get_args();
|
|
|
- if ($this->table) {
|
|
|
- array_shift($arg_list);
|
|
|
- }
|
|
|
- $act = "cache" . ucfirst($funcName);
|
|
|
- $data = call_user_func_array(array($this, $act), $arg_list);
|
|
|
- $this->setCache($cache_key, $data, rand(1, 3));
|
|
|
+
|
|
|
+ $arg_list = func_get_args();
|
|
|
+ if ($this->table) {
|
|
|
+ array_shift($arg_list);
|
|
|
}
|
|
|
+ $act = "cache" . ucfirst($funcName);
|
|
|
+ $data = call_user_func_array(array($this, $act), $arg_list);
|
|
|
return $data;
|
|
|
}
|
|
|
|