<?php
class ZibanmaCache{
	public $_cache;
	public $cache_error = array();
	
	public function __construct(){
		switch (ZIBANMA_SYS_CACHE_TYPE){
			case 1 :
				$this->_cache = new ZibanmaCacheDatabase();
			break;
			case 2 : 
				$this->_cache = new ZibanmaCacheFile();
			break;
			case 3 :
				$this->_cache = new ZibanmaCacheRedis();
			break;
			case 4 :
				$this->_cache = new ZibanmaCacheMemcache();
			break;
			default : 
				$this->cache_error[] = '缓存类型错误';
			break;
		}
	}
	
	public function put($id, $value, $limit){
		
	}
	
	public function get($id){
		
	}
	
	public function has($id){
		return true;
	}
	
	public function forgat(){
		
	}
	
	public function forgat_all(){
		
	}
	
	public function get_error(){
		return $this->cache_error;
	}
}
?>