After upgrade Kohana framework from 3.2 to 3.3, Cache ask me to put an default group to it.
config/cache.php
return array(
'default' => array( // Driver group
'driver' => 'apc', // using APC driver
'default_expire' => 3600, // life time
),
);
Before, I used to do like this without the group name:
Cache::instance()->set('key', 'val');
Now, that sends an Exception: Failed to load Kohana Cache group: file.
But, when I set the name group all woks perfect.
Cache::instance('default')->set('key', 'val');
How can I set now in 3.3 a default group without type it always whatever I want to use it? Maybe is a new upgrade, but, I checked the new features of kohana 3.3 and I don’t see any of that.
Hope you can help me.
Alright so, here’s the deal. Without the cache group supplied, it defaults to file. So if you -dare- change that, be my guest. But just set the static instance in
bootstrap.php, answer at the bottom.— This is from the base cache class. —
So in your
bootstrap.phpset this, though I would name it to APC in your config: