-
-
Notifications
You must be signed in to change notification settings - Fork 456
/
Copy pathClusterPoolTrait.php
69 lines (59 loc) · 1.26 KB
/
ClusterPoolTrait.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
*
* This file is part of Phpfastcache.
*
* @license MIT License (MIT)
*
* For full copyright and license information, please see the docs/CREDITS.txt file.
*
* @author Georges.L (Geolim4) <[email protected]>
*
*/
declare(strict_types=1);
namespace Phpfastcache\Cluster;
use Phpfastcache\Core\Item\ExtendedCacheItemInterface;
use Psr\Cache\CacheItemInterface;
trait ClusterPoolTrait
{
protected function driverCheck(): bool
{
return true;
}
protected function driverConnect(): bool
{
return true;
}
/**
* @param ExtendedCacheItemInterface $item
* @return ?array<string, mixed>
*/
protected function driverRead(ExtendedCacheItemInterface $item): ?array
{
return null;
}
/**
* @param ExtendedCacheItemInterface $item
* @return bool
*/
protected function driverWrite(ExtendedCacheItemInterface $item): bool
{
return true;
}
/**
* @param string $key
* @param string $encodedKey
* @return bool
*/
protected function driverDelete(string $key, string $encodedKey): bool
{
return true;
}
/**
* @return bool
*/
protected function driverClear(): bool
{
return true;
}
}