I trying to use apc in kohana 3.3 and i have a small problem. If i used original apc query like apc_add('name', $data, 86400);
it's working pretty good, but my kohana's query like that does not work.
Query:
$stat = false;
$object = Cache::instance()->get('admin_products1', FALSE);
if ($stat === $object) {
$model = new Model_Main();
$object = $model->product_name();
Cache::instance()->set('admin_products1', $object, 60);
}
return $object;
Configuration in config/cache.php
:
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'apc' => array(
'driver' => 'apc',
'default_expire' => 60,
)
);
I also added this line to bootstrap: Cache::$default = 'apc';
I thought that this should work but it just returns a blank page. Why isn't it working?