reports: Don't validate report names in javascript
[ninja.git] / system / libraries / drivers / Cache / Eaccelerator.php
blobe82c65d1604b0138ef0ab021d54f6fcd9fd310a6
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Eaccelerator-based Cache driver.
5 * $Id: Eaccelerator.php 3917 2009-01-21 03:06:22Z zombor $
7 * @package Cache
8 * @author Kohana Team
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 return FALSE;
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)
39 if ($id === TRUE)
40 return eaccelerator_clean();
42 if ($tag == FALSE)
43 return eaccelerator_rm($id);
45 return TRUE;
48 public function delete_expired()
50 eaccelerator_gc();
53 } // End Cache eAccelerator Driver