function exists($key,&$val=NULL) {
		$fw=Base::instance();
		if (!$this->dsn)
			return FALSE;
		$ndx=$this->prefix.'.'.$key;
		$parts=explode('=',$this->dsn,2);
		switch ($parts[0]) {
			case 'apc':
			case 'apcu':
				$raw=call_user_func($parts[0].'_fetch',$ndx);
				break;
			case 'redis':
				$raw=$this->ref->get($ndx);
				break;
			case 'memcache':
				$raw=memcache_get($this->ref,$ndx);
				break;
			case 'memcached':
				$raw=$this->ref->get($ndx);
				break;
			case 'wincache':
				$raw=wincache_ucache_get($ndx);
				break;
			case 'xcache':
				$raw=xcache_get($ndx);
				break;
			case 'folder':
				$raw=$fw->read($parts[1].$ndx);
				break;
		}
		if (!empty($raw)) {
			list($val,$time,$ttl)=(array)$fw->unserialize($raw);
			if ($ttl===0 || $time+$ttl>microtime(TRUE))
				return [$time,$ttl];
			$val=null;
			$this->clear($key);
		}
		return FALSE;
	}
function exists($key,&$val=NULL) {
		$fw=Base::instance();
		if (!$this->dsn)
			return FALSE;
		$ndx=$this->prefix.'.'.$key;
		$parts=explode('=',$this->dsn,2);
		switch ($parts[0]) {
			case 'apc':
			case 'apcu':
				$raw=call_user_func($parts[0].'_fetch',$ndx);
				break;
			case 'redis':
				$raw=$this->ref->get($ndx);
				break;
			case 'memcache':
				$raw=memcache_get($this->ref,$ndx);
				break;
			case 'memcached':
				$raw=$this->ref->get($ndx);
				break;
			case 'wincache':
				$raw=wincache_ucache_get($ndx);
				break;
			case 'xcache':
				$raw=xcache_get($ndx);
				break;
			case 'folder':
				$raw=$fw->read($parts[1].$ndx);
				break;
		}
		if (!empty($raw)) {
			list($val,$time,$ttl)=(array)$fw->unserialize($raw);
			if ($ttl===0 || $time+$ttl>microtime(TRUE))
				return [$time,$ttl];
			$val=null;
			$this->clear($key);
		}
		return FALSE;
	}
function exists ( $ key , & $ val = NULL ) { $ fw = Base :: instance ( ) ; if ( ! $ this -> dsn ) return FALSE ; $ ndx = $ this -> prefix . '.' . $ key ; $ parts = explode ( '=' , $ this -> dsn , 2 ) ; switch ( $ parts [ 0 ] ) { case 'apc' : case 'apcu' : $ raw = call_user_func ( $ parts [ 0 ] . '_fetch' , $ ndx ) ; break ; case 'redis' : $ raw = $ this -> ref -> get ( $ ndx ) ; break ; case 'memcache' : $ raw = memcache_get ( $ this -> ref , $ ndx ) ; break ; case 'memcached' : $ raw = $ this -> ref -> get ( $ ndx ) ; break ; case 'wincache' : $ raw = wincache_ucache_get ( $ ndx ) ; break ; case 'xcache' : $ raw = xcache_get ( $ ndx ) ; break ; case 'folder' : $ raw = $ fw -> read ( $ parts [ 1 ] . $ ndx ) ; break ; } if ( ! empty ( $ raw ) ) { list ( $ val , $ time , $ ttl ) = ( array ) $ fw -> unserialize ( $ raw ) ; if ( $ ttl === 0 || $ time + $ ttl > microtime ( TRUE ) ) return [ $ time , $ ttl ] ; $ val = null ; $ this -> clear ( $ key ) ; } return FALSE ; }
Return timestamp and TTL of cache entry or FALSE if not found
@return array|FALSE
@param $key string
@param $val mixed
Return timestamp and TTL of cache entry or FALSE if not found