Server : Apache System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/saimikebio.com/mobile/include/kernel/ |
<?php // +---------------------------------------------------------------------- // | EcTouch [ 专注移动电商: 商创网络科技 ] // +---------------------------------------------------------------------- // | Copyright (c) 2014 http://ectouch.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: EcTouch Team <zhong@ecmoban.com> (QQ: 2880175560) // +---------------------------------------------------------------------- //缓存类 class EcCache { protected $cache = NULL; public function __construct($config = array(), $type = 'FileCache') { $cacheDriver = 'Ec' . $type; require_once(dirname(__FILE__) . '/cache/' . $cacheDriver . '.class.php'); $this->cache = new $cacheDriver($config); } //读取缓存 public function get($key) { return $this->cache->get($key); } //设置缓存 public function set($key, $value, $expire = 1800) { return $this->cache->set($key, $value, $expire); } //自增1 public function inc($key, $value = 1) { return $this->cache->inc($key, $value); } //自减1 public function des($key, $value = 1) { return $this->cache->des($key, $value); } //删除 public function del($key) { return $this->cache->del($key); } //清空缓存 public function clear() { return $this->cache->clear(); } }