<?php
/**
 * Power By Tmac PHP MVC framework
 * $Author: zhangwentao $  <zwttmac@qq.com>
 * $Id: CacheDriver.class.php 4 2011-11-02 11:02:08Z zhangwentao $
 * http://www.t-mac.org；
 */
class CacheDriver {
	/**
	 * 缓存实例
	 *
	 * @var object
	 */
	static protected $instance = null;

	/**
	 * 取得缓存实例
	 *
	 * @return objeact
	 * @access public
	 * @static
	 */
	public static function getInstance() {
		global $TmacConfig;
		$class = 'Cache' . $TmacConfig['Cache']['class'];
		if (is_null(self::$instance)) {
			self::$instance = new $class();
		}
		return self::$instance;
	}
}