class BocProduct extends Model
{
protected $cate_type = 'product-product-list';
//获取内容
public function get_info($cate_type,$cache_tag,$id){
$info = Cache::get($cate_type.'-'.$id);
if(empty($info)){
//更新浏览量
$info = self::field('*')->where('id', $id)->find()->toArray();
Cache::tag($cache_tag)->set($cate_type.'-'.$id,$info);
}
return $info;
}
//获取其它类型数据
public function get_list($cate_type,$cache_tag,$type = 'TENTIMES_LAND'){
//获取缓存
$list = Cache::get($cate_type.'-'.$type);
USER | www |
HOME | /home/www |
HTTP_HOST | www.tiantai.com.cn |
HTTP_REFERER | http://www.tiantai.com.cn/product/info/44/tentimes_land.html |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
PATH_INFO | //product/info/44/tentimes_land.html |
REDIRECT_STATUS | 200 |
SERVER_NAME | tiantai.com.cn |
SERVER_PORT | 443 |
SERVER_ADDR | 172.21.126.135 |
REMOTE_PORT | 33056 |
REMOTE_ADDR | 3.84.7.255 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/new_tiantai/public |
DOCUMENT_URI | /index.php//product/info/44/tentimes_land.html |
REQUEST_URI | /product/info/44/tentimes_land.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SCRIPT_FILENAME | /www/wwwroot/new_tiantai/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php//product/info/44/tentimes_land.html |
REQUEST_TIME_FLOAT | 1711637417.214 |
REQUEST_TIME | 1711637417 |