forked from neos/flow-development-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNullBackend.php
More file actions
156 lines (141 loc) · 3.02 KB
/
Copy pathNullBackend.php
File metadata and controls
156 lines (141 loc) · 3.02 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
declare(strict_types=1);
namespace Neos\Cache\Backend;
/*
* This file is part of the Neos.Cache package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
// @codeCoverageIgnoreStart
use Neos\Cache\Backend\AbstractBackend as AbstractCacheBackend;
/**
* A caching backend which forgets everything immediately
*
* @api
*/
class NullBackend extends AbstractCacheBackend implements PhpCapableBackendInterface, TaggableBackendInterface
{
/**
* Successfully ignore every configured property
*
* @param string $propertyName
* @param mixed $propertyValue
* @return boolean TRUE
*/
protected function setProperty(string $propertyName, $propertyValue) : bool
{
return true;
}
/**
* Acts as if it would save data
*
* @param string $entryIdentifier ignored
* @param string $data ignored
* @param array<string> $tags ignored
* @param ?integer $lifetime ignored
* @return void
* @api
*/
public function set(string $entryIdentifier, string $data, array $tags = [], ?int $lifetime = null): void
{
}
/**
* Returns False
*
* @param string $entryIdentifier ignored
* @return boolean false
* @api
*/
public function get(string $entryIdentifier)
{
return false;
}
/**
* Returns False
*
* @param string $entryIdentifier ignored
* @return boolean false
* @api
*/
public function has(string $entryIdentifier): bool
{
return false;
}
/**
* Does nothing
*
* @param string $entryIdentifier ignored
* @return boolean false
* @api
*/
public function remove(string $entryIdentifier): bool
{
return false;
}
/**
* Returns an empty array
*
* @param string $tag ignored
* @return string[] An empty array
* @api
*/
public function findIdentifiersByTag(string $tag): array
{
return [];
}
/**
* Does nothing
*
* @return void
* @api
*/
public function flush(): void
{
}
/**
* Does nothing
*
* @param string $tag ignored
* @return integer
* @api
*/
public function flushByTag(string $tag): int
{
return 0;
}
/**
* Does nothing
*
* @param array<string> $tags ignored
* @return integer
* @api
*/
public function flushByTags(array $tags): int
{
return 0;
}
/**
* Does nothing
*
* @return void
* @api
*/
public function collectGarbage(): void
{
}
/**
* Does nothing
*
* @param string $identifier An identifier which describes the cache entry to load
* @return void
* @api
*/
public function requireOnce(string $identifier)
{
}
}
// @codeCoverageIgnoreEnd