summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorrodneyrehm <rodneyrehm@localhost>2011-09-19 20:17:22 +0000
committerrodneyrehm <rodneyrehm@localhost>2011-09-19 20:17:22 +0000
commitc877da74de38808351558cf77ce8c05175bf8711 (patch)
tree7bb95f97f41cf01ea2857832d302e05a6b5469ae /demo
parent8e6626fbca3d04898ba289cd521988e972899fa1 (diff)
downloadsmarty-c877da74de38808351558cf77ce8c05175bf8711.tar.gz
smarty-c877da74de38808351558cf77ce8c05175bf8711.tar.bz2
smarty-c877da74de38808351558cf77ce8c05175bf8711.zip
- bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261
- added APC test - added read/write test to APC demo ('cause it ain't working on my machine!?)
Diffstat (limited to 'demo')
-rw-r--r--demo/plugins/cacheresource.apc.php11
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');
+ }
}
/**