-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCache.php
More file actions
45 lines (32 loc) · 1.04 KB
/
Cache.php
File metadata and controls
45 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
declare(strict_types=1);
/*
* This file is part of the QuidPHP package <https://quidphp.com>
* Author: Pierre-Philippe Emond <emondpph@gmail.com>
* License: https://github.com/quidphp/main/blob/master/LICENSE
*/
namespace Quid\Main\Contract;
// cache
// interface to detail the methods required for implementing caching functionality to an object
interface Cache
{
// getData
// retourne le tableau des donnés de la cache
public function getData():array;
// getContent
// retourne les donnés de la cache sous forme de string
public function getContent():string;
// getDate
// retourne la date de création de la cache
public function getDate():int;
// store
// enregistre une nouvelle entrée de cache
public static function store(array $context,string $data):?int;
// clearAll
// vide la cache de toutes ses entrées
public static function clearAll():void;
// findByContext
// retourne la cache par contexte
public static function findByContext(array $context):?self;
}
?>