1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 * Eaccelerator-based Cache driver.
5 * $Id: Eaccelerator.php 4046 2009-03-05 19:23:29Z Shadowhand $
9 * @copyright (c) 2007-2008 Kohana Team
10 * @license http://kohanaphp.com/license.html
12 class Cache_Eaccelerator_Driver implements Cache_Driver {
14 public function __construct()
16 if ( ! extension_loaded('eaccelerator'))
17 throw new Kohana_Exception('cache.extension_not_loaded', 'eaccelerator');
20 public function get($id)
22 return eaccelerator_get($id);
25 public function find($tag)
27 Kohana::log('error', 'tags are unsupported by the eAccelerator driver');
32 public function set($id, $data, array $tags = NULL, $lifetime)
36 Kohana::log('error', 'tags are unsupported by the eAccelerator driver');
39 return eaccelerator_put($id, $data, $lifetime);
42 public function delete($id, $tag = FALSE)
46 Kohana::log('error', 'tags are unsupported by the eAccelerator driver');
51 return eaccelerator_clean();
55 return eaccelerator_rm($id);
59 public function delete_expired()
66 } // End Cache eAccelerator Driver