<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: class_eaccelerator.php 7158 2010-03-30 03:40:23Z cnteacher $
 */

class cache {
	
	//禁止实例化
	private function __construct() {}

	public static function get($key) {
		return eaccelerator_get($key);
	}

	public static function set($key, $value, $ttl = 0) {
		eaccelerator_lock($key);
		return eaccelerator_put($key, $value, $ttl);
	}

	public static function delete($key) {
		return eaccelerator_rm($key);
	}
	
	public static function flush()
    {
        return eaccelerator_gc();
    }

}

?>