From bde25d971bfbf4a54f1d40eedfd3290ebb5f91e5 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Tue, 21 Dec 2010 09:31:21 -0600 Subject: Initial commit of Caching Driver. --- system/libraries/Cache/drivers/Cache_apc.php | 151 +++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 system/libraries/Cache/drivers/Cache_apc.php (limited to 'system/libraries/Cache/drivers/Cache_apc.php') diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php new file mode 100644 index 000000000..9c716a971 --- /dev/null +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -0,0 +1,151 @@ + $time + $ttl, + 'mtime' => $time, + 'data' => $data + ); + } + + // ------------------------------------------------------------------------ + + /** + * is_supported() + * + * Check to see if APC is available on this system, bail if it isn't. + */ + public function is_supported() + { + if ( ! extension_loaded('apc') OR ! function_exists('apc_store')) + { + log_message('error', 'The APC PHP extension must be loaded to use APC Cache.'); + return FALSE; + } + + return TRUE; + } + + // ------------------------------------------------------------------------ + + +} +// End Class + +/* End of file Cache_apc.php */ +/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b