1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Eaccelerator-based Cache driver.
5 * $Id: Eaccelerator.php 3917 2009-01-21 03:06:22Z zombor $
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)
30 public function set($id, $data, $tags, $lifetime)
32 count($tags) and Kohana
::log('error', 'tags are unsupported by the eAccelerator driver');
34 return eaccelerator_put($id, $data, $lifetime);
37 public function delete($id, $tag = FALSE)
40 return eaccelerator_clean();
43 return eaccelerator_rm($id);
48 public function delete_expired()
53 } // End Cache eAccelerator Driver