diff options
Diffstat (limited to 'demo/plugins/cacheresource.apc.php')
| -rw-r--r-- | demo/plugins/cacheresource.apc.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/demo/plugins/cacheresource.apc.php b/demo/plugins/cacheresource.apc.php index 40369e3a..5403f3bc 100644 --- a/demo/plugins/cacheresource.apc.php +++ b/demo/plugins/cacheresource.apc.php @@ -14,8 +14,15 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore { public function __construct() { // test if APC is present - if(!function_exists('apc_cache_info')) - throw new Exception('APC Template Caching Error: APC is not installed'); + if(!function_exists('apc_cache_info')) { + throw new Exception('APC Template Caching Error: APC is not installed'); + } + + apc_store(array('foo' => 'bar')); + $t = apc_fetch(array('foo')); + if (!$t || $t['foo'] != 'bar') { + throw new Exception('APC Template Caching Error: APC is not working properly'); + } } /** |
