-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Caches.Schema.json
306 lines (306 loc) · 15 KB
/
Caches.Schema.json
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/Sebobo/Shel.Neos.Schema/main/Caches.Schema.json",
"title": "Neos Caching Configuration Schema",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/cache"
},
"definitions": {
"cache": {
"type": "object",
"properties": {
"frontend": {
"$ref": "#/definitions/frontend"
},
"persistent": {
"type": "boolean"
}
},
"$ref": "#/definitions/backendWithOptions"
},
"frontend": {
"oneOf": [
{
"type": "string",
"not": {
"enum": [
"Neos\\Cache\\Frontend\\StringFrontend",
"Neos\\Cache\\Frontend\\VariableFrontend",
"Neos\\Cache\\Frontend\\PhpFrontend",
"Neos\\Cache\\Frontend\\PhpCapableBackendInterface"
]
}
},
{
"enum": [
"Neos\\Cache\\Frontend\\StringFrontend",
"Neos\\Cache\\Frontend\\VariableFrontend",
"Neos\\Cache\\Frontend\\PhpFrontend",
"Neos\\Cache\\Frontend\\PhpCapableBackendInterface"
]
}
]
},
"backendWithOptions": {
"anyOf": [
{
"type": "object",
"properties": {
"backend": {
"type": "string",
"description": "The qualified classname of the backend implementation",
"not": {
"enum": [
"Neos\\Cache\\Backend\\SimpleFileBackend",
"Neos\\Cache\\Backend\\FileBackend",
"Neos\\Cache\\Backend\\PdoBackend",
"Neos\\Cache\\Backend\\RedisBackend",
"Neos\\Cache\\Backend\\MemcachedBackend",
"Neos\\Cache\\Backend\\ApcuBackend",
"Neos\\Cache\\Backend\\TransientMemoryBackend",
"Neos\\Cache\\Backend\\NullBackend",
"Neos\\Cache\\Backend\\MultiBackend",
"Neos\\Cache\\Backend\\TaggableMultiBackend"
]
}
},
"backendOptions": {
"type": ["object", "array"],
"description": "Options passed to the backend implementation"
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\SimpleFileBackend"
},
"backendOptions": {
"type": "object",
"properties": {
"cacheDirectory": {
"type": "string",
"description": "Full path leading to a custom cache directory.",
"examples": [
"/tmp/my-cache-directory/"
]
}
}
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\FileBackend"
},
"backendOptions": {
"type": "object",
"properties": {
"cacheDirectory": {
"type": "string",
"description": "Full path leading to a custom cache directory.",
"examples": [
"/tmp/my-cache-directory/"
]
},
"defaultLifetime": {
"$ref": "#/definitions/defaultLifetime"
}
}
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\PdoBackend"
},
"backendOptions": {
"type": "object",
"properties": {
"dataSourceName": {
"type": "string",
"description": "Data source name for connecting to the database.",
"examples": [
"mysql:host=localhost;dbname=test;charset=utf8mb4",
"sqlite:/path/to/sqlite.db",
"sqlite:memory"
]
},
"username": {
"type": "string",
"description": "Username to use for the database connection."
},
"password": {
"type": "string",
"description": "Password to use for the database connection."
},
"defaultLifetime": {
"$ref": "#/definitions/defaultLifetime"
}
},
"required": [
"dataSourceName"
]
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\RedisBackend"
},
"backendOptions": {
"type": "object",
"properties": {
"hostname": {
"type": "string",
"description": "IP address or name of redis server to connect to.",
"default": "127.0.0.1"
},
"port": {
"type": "integer",
"description": "Port of the Redis server.",
"default": 6379
},
"database": {
"type": "integer",
"description": "Number of the database to store entries. Each cache should use its own database, otherwise all caches sharing a database are flushed if the flush operation is issued to one of them. Database numbers 0 and 1 are used and flushed by the core unit tests and should not be used if possible.",
"default": 0
},
"password": {
"type": "string",
"description": "Password used to connect to the redis instance if the redis server needs authentication. Warning: The password is sent to the redis server in plain text."
},
"compressionLevel": {
"type": "integer",
"description": "Set gzip compression level to a specific value.",
"default": 0,
"minimum": 0,
"maximum": 9
},
"defaultLifetime": {
"$ref": "#/definitions/defaultLifetime"
}
}
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\MemcachedBackend"
},
"backendOptions": {
"type": "object",
"properties": {
"servers": {
"type": "array",
"description": "Array of used memcached servers, at least one server must be defined. Each server definition is a string, allowed syntaxes:\n\nhost\n TCP connect to host on memcached default port (usually 11211, defined by PHP ini variable memcache.default_port\n\nhost:port\n TCP connect to host on port\n\ntcp://hostname:port\n Same as above\n\nunix:///path/to/memcached.sock\n Connect to memcached server using unix sockets",
"x-intellij-html-description": "<p>Array of used memcached servers, at least one server must be defined. Each server definition is a string, allowed syntaxes:<ul><li><strong>hosty</strong><br>TCP connect to host on memcached default port (usually 11211, defined by PHP ini variable memcache.default_port</li><li><strong>host:port</strong><br>TCP connect to host on port</li><li><strong>tcp://hostname:port</strong><br>Same as above</li><li><strong>unix:///path/to/memcached.sock</strong><br>Connect to memcached server using unix sockets</li></ul></p>"
},
"compression": {
"type": "boolean",
"description": "Enable memcached internal data compression. Can be used to reduce memcached memory consumption but adds additional compression / decompression CPU overhead on the according memcached servers.",
"default": false
},
"defaultLifetime": {
"$ref": "#/definitions/defaultLifetime"
}
},
"required": [
"servers"
]
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\ApcuBackend"
},
"backendOptions": {
"type": ["object", "array"]
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\TransientMemoryBackend"
},
"backendOptions": {
"type": ["object", "array"]
}
}
},
{
"type": "object",
"properties": {
"backend": {
"const": "Neos\\Cache\\Backend\\NullBackend"
},
"backendOptions": {
"type": ["object", "array"]
}
}
},
{
"type": "object",
"properties": {
"backend": {
"oneOf": [
{
"const": "Neos\\Cache\\Backend\\MultiBackend"
},
{
"const": "Neos\\Cache\\Backend\\TaggableMultiBackend"
}
]
},
"backendOptions": {
"type": "object",
"properties": {
"setInAllBackends": {
"type": "boolean",
"description": "Should values given to the backend be replicated into all configured and available backends? Generally that is desirable for fallback purposes, but to avoid too much duplication at the cost of performance on fallbacks this can be disabled.",
"default": true
},
"backendConfigurations": {
"type": "array",
"description": "A list of backends to be used in order of appearance. Each entry in that list should have the keys “backend” and “backendOptions” just as a top level backend configuration.",
"items": {
"$ref": "#/definitions/backendWithOptions"
},
"default": []
},
"debug": {
"type": "boolean",
"description": "Switch on debug mode which will throw any errors happening in sub backends. Use this in development to make sure everything works as expected.",
"default": false
},
"defaultLifetime": {
"$ref": "#/definitions/defaultLifetime"
}
}
}
}
}
]
},
"defaultLifetime": {
"type": "integer",
"default": 3600,
"description": "Default lifetime in seconds of a cache entry if it is not specified for a specific entry on set()"
}
}
}