forked from leftypol/leftypol
context.php: use shared cache driver
This commit is contained in:
parent
842b4fdcee
commit
eca2ce0a8f
1 changed files with 7 additions and 0 deletions
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
namespace Vichan;
|
||||
|
||||
use Vichan\Data\Driver\CacheDriver;
|
||||
|
||||
defined('TINYBOARD') or exit;
|
||||
|
||||
|
||||
class Context {
|
||||
private array $definitions;
|
||||
|
||||
|
@ -27,5 +30,9 @@ class Context {
|
|||
function build_context(array $config): Context {
|
||||
return new Context([
|
||||
'config' => $config,
|
||||
CacheDriver::class => function($c) {
|
||||
// Use the global for backwards compatibility.
|
||||
return \cache::getCache();
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue