mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-03 01:55:27 +00:00
implement connection cache
This commit is contained in:
parent
089bf67a5b
commit
03ac7647b7
6 changed files with 215 additions and 58 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Yggverse\Yoda\Interface\Model;
|
||||
|
||||
use \Yggverse\Yoda\Model\Database;
|
||||
use \Yggverse\Yoda\Model\Pool;
|
||||
|
||||
/*
|
||||
|
|
@ -13,6 +14,7 @@ use \Yggverse\Yoda\Model\Pool;
|
|||
interface Connection
|
||||
{
|
||||
public function __construct(
|
||||
Database $database,
|
||||
?Pool $pool = null
|
||||
);
|
||||
|
||||
|
|
@ -74,6 +76,14 @@ interface Connection
|
|||
|
||||
public function getLength(): ?int;
|
||||
|
||||
public function getCache(
|
||||
string $request
|
||||
): ?object;
|
||||
|
||||
public function cache(
|
||||
string $request
|
||||
): void;
|
||||
|
||||
public function reset(): void;
|
||||
|
||||
public function close(): void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue