-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathconfig.php
More file actions
300 lines (238 loc) · 13 KB
/
Copy pathconfig.php
File metadata and controls
300 lines (238 loc) · 13 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
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
<?php
/**
* @copyright Copyright (c) PutYourLightsOn
*/
/**
* Blitz config.php
*
* This file exists only as a template for the Blitz settings.
* It does nothing on its own.
*
* Don't edit this file, instead copy it to 'craft/config' as 'blitz.php'
* and make your changes there to override default settings.
*
* Once copied to 'craft/config', this file will be multi-environment aware as
* well, so you can have different settings groups for each environment, just as
* you do for 'general.php'
*/
return [
'*' => [
// With this setting enabled, Blitz will log detailed messages to `storage/logs/blitz.log`.
//'debug' => false,
// With this setting enabled, Blitz will begin caching pages according to the included/excluded URI patterns. Disable this setting to prevent Blitz from caching any new pages.
//'cachingEnabled' => false,
// With this setting enabled, Blitz will refresh cached pages whenever content changes or an integration triggers it. Disable this setting to prevent Blitz from refreshing cached pages.
//'refreshCacheEnabled' => true,
// Determines when and how the cache should be refreshed.
//'refreshMode' => \putyourlightson\blitz\models\SettingsModel::REFRESH_MODE_CLEAR_AND_GENERATE, // Clear the cache and regenerate in a queue job
//'refreshMode' => \putyourlightson\blitz\models\SettingsModel::REFRESH_MODE_EXPIRE_AND_GENERATE, // Expire the cache and regenerate in a queue job
//'refreshMode' => \putyourlightson\blitz\models\SettingsModel::REFRESH_MODE_CLEAR, // Clear the cache, regenerate manually or organically
//'refreshMode' => \putyourlightson\blitz\models\SettingsModel::REFRESH_MODE_EXPIRE, // Expire the cache, regenerate manually or organically
// The URI patterns to include in caching. Set `siteId` to a blank string to indicate all sites.
//'includedUriPatterns' => [
// [
// 'enabled' => true,
// 'siteId' => 1,
// 'uriPattern' => 'pages/.*',
// ],
// [
// 'enabled' => true,
// 'siteId' => 2,
// 'uriPattern' => 'articles/.*',
// ],
//],
// The URI patterns to exclude from caching (overrides any matching patterns to include). Set `siteId` to a blank string to indicate all sites.
//'excludedUriPatterns' => [
// [
// 'enabled' => true,
// 'siteId' => 1,
// 'uriPattern' => 'pages/contact',
// ],
//],
// The storage type to use.
//'cacheStorageType' => 'putyourlightson\blitz\drivers\storage\FileStorage',
// The storage settings.
//'cacheStorageSettings' => [
// 'folderPath' => '@webroot/cache/blitz',
// 'compressCachedValues' => false,
// 'countCachedFiles' => true,
//],
// The storage type classes to add to the plugin’s default storage types.
//'cacheStorageTypes' => [],
// The generator type to use.
//'cacheGeneratorType' => 'putyourlightson\blitz\drivers\generators\HttpGenerator',
// The generator settings.
//'cacheGeneratorSettings' => ['concurrency' => 3],
// The generator type classes to add to the plugin’s default generator types.
//'cacheGeneratorTypes' => [],
// Custom site URIs to generate when either a site or the entire cache is generated.
//'customSiteUris' => [
// [
// 'siteId' => 1,
// 'uri' => 'pages/custom',
// ],
//],
// The purger type to use.
//'cachePurgerType' => 'putyourlightson\blitz\drivers\purgers\CloudflarePurger',
// The purger settings (zone ID keys are site UIDs).
//'cachePurgerSettings' => [
// 'zoneIds' => [
// 'f64d4923-f64d4923-f64d4923' => [
// 'zoneId' => '',
// ],
// ],
// 'authenticationMethod' => 'apiKey',
// 'apiKey' => '',
// 'email' => '',
//],
// The purger type classes to add to the plugin’s default purger types.
//'cachePurgerTypes' => [
// 'putyourlightson\blitzcloudfront\CloudFrontPurger',
//],
// The deployer type to use.
//'deployerType' => 'putyourlightson\blitz\drivers\deployers\GitDeployer',
// The deployer settings (zone ID keys are site UIDs).
//'deployerSettings' => [
// 'gitRepositories' => [
// 'f64d4923-f64d4923-f64d4923' => [
// 'repositoryPath' => '@root/path/to/repo',
// 'branch' => 'main',
// 'remote' => 'origin',
// ],
// ],
// 'commitMessage' => 'Blitz auto commit',
// 'username' => '',
// 'personalAccessToken' => '',
// 'name' => '',
// 'email' => '',
// 'commandsBefore' => '',
// 'commandsAfter' => '',
//],
// The deployer type classes to add to the plugin’s default deployer types.
//'deployerTypes' => [
// 'putyourlightson\blitzshell\ShellDeployer',
//],
// With this setting enabled, Blitz will statically include templates using Server-Side Includes (SSI), which must be enabled on the web server.
//'ssiEnabled' => false,
// The format to use for SSI tags, in which `{uri}` will be replaced. You can change this when using Caddy’s `httpInclude` template function, for example.
// https://caddyserver.com/docs/modules/http.handlers.templates#httpinclude
//'ssiTagFormat' => '<!--#include virtual="{uri}" -->',
// Whether SSI detection via the control panel should be enabled.
//'detectSsiEnabled' => true,
// With this setting enabled, Blitz will statically include templates using Edge-Side Includes (ESI), which must be enabled on the web server or CDN.
//'esiEnabled' => false,
// The query string path parameter to use for cached includes.
//'cachedIncludePathParam' => 'p',
// Whether only URIs containing lowercase characters should be cached.
//'onlyCacheLowercaseUris' => false,
// Whether action requests can be cached.
//'cacheActionRequests' => false,
// Whether URLs with query strings should be cached and how.
// `\putyourlightson\blitz\models\SettingsModel::QUERY_STRINGS_DO_NOT_CACHE_URLS`: Do not cache URLs with query strings
// `\putyourlightson\blitz\models\SettingsModel::QUERY_STRINGS_CACHE_URLS_AS_UNIQUE_PAGES`: Cache URLs with query strings as unique pages
// `\putyourlightson\blitz\models\SettingsModel::QUERY_STRINGS_CACHE_URLS_AS_SAME_PAGE`: Cache URLs with query strings as the same page
//'queryStringCaching' => \putyourlightson\blitz\models\SettingsModel::QUERY_STRINGS_DO_NOT_CACHE_URLS,
// The query string parameters to include (retain) when caching a URL (regular expressions may be used).
//'includedQueryStringParams' => [
// [
// 'enabled' => true,
// 'siteId' => '',
// 'queryStringParam' => '.*',
// ],
//],
// The query string parameters to exclude (disregard) when caching a URL (regular expressions may be used).
//'excludedQueryStringParams' => [
// [
// 'enabled' => true,
// 'siteId' => '',
// 'queryStringParam' => 'gclid',
// ],
// [
// 'enabled' => true,
// 'siteId' => '',
// 'queryStringParam' => 'fbclid',
// ],
//],
// An API key that can be used via a URL (min. 16 characters).
//'apiKey' => '',
// Whether pages containing query string parameters should be generated.
//'generatePagesWithQueryStringParams' => true,
// Whether asset images should be purged when changed.
//'purgeAssetImagesWhenChanged' => true,
// Whether the cache should automatically be refreshed after a global set is updated.
//'refreshCacheAutomaticallyForGlobals' => true,
// Whether the cache should be refreshed when an element is moved within a structure.
//'refreshCacheWhenElementMovedInStructure' => true,
// Whether the cache should be refreshed when an element is saved but unchanged.
//'refreshCacheWhenElementSavedUnchanged' => false,
// Whether the cache should be refreshed when an element is saved but not live.
//'refreshCacheWhenElementSavedNotLive' => false,
// Whether expired cached pages should be refreshed after being visited by a user.
//'refreshExpiredCacheAfterVisit' => true,
// Whether non-HTML responses should be cached. With this setting enabled, Blitz will also cache pages that return non-HTML responses. If enabled, you should ensure that URIs that should not be cached, such as API endpoints, XML sitemaps, etc. are added as excluded URI patterns.
//'cacheNonHtmlResponses' => false,
// Whether elements should be tracked in the database.
//'trackElements' => true,
// Whether element queries should be tracked in the database.
//'trackElementQueries' => true,
// The element query params to exclude when storing tracked element queries.
//'excludedTrackedElementQueryParams' => [
// 'limit',
// 'offset',
//],
// The amount of time after which the cache should expire (if not 0). See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
//'cacheDuration' => 0,
// Element types that should not be cached (in addition to the defaults).
//'nonCacheableElementTypes' => [
// 'putyourlightson\campaign\elements\ContactElement',
//],
// Source ID attributes for element types (in addition to the defaults).
//'sourceIdAttributes' => [
// 'putyourlightson\campaign\elements\CampaignElement' => 'campaignTypeId',
//],
// The integrations to initialise.
//'integrations' => [
// 'putyourlightson\blitz\drivers\integrations\CommerceIntegration',
// 'putyourlightson\blitz\drivers\integrations\DatastarIntegration',
// 'putyourlightson\blitz\drivers\integrations\SeomaticIntegration',
//],
// The value to send in the cache control header for non-cached pages.
//'defaultCacheControlHeader' => 'no-store',
// The value to send in the cache control header for cached pages.
//'cacheControlHeader' => 'public, s-maxage=31536000, max-age=0',
// The value to send in the cache control header for expired pages.
//'cacheControlHeaderExpired' => 'public, s-maxage=5, max-age=0',
// Whether an `X-Powered-By: Blitz` header should be added to the response.
//'sendPoweredByHeader' => true,
// Whether the "cached on" and "served by" timestamp comments should be appended to the cached output.
// - `false`: Do not append any comments
// - `true`: Append all comments
// - `2`: Append "cached on" comment only
// - `3`: Append "served by" comment only
//'outputComments' => true,
// The priority to give the refresh cache job (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
//'refreshCacheJobPriority' => 10,
//The batch size to use for driver jobs that support batching.
//'driverJobBatchSize' => 100,
// The priority to give driver jobs (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
//'driverJobPriority' => 100,
// The time to reserve for queue jobs in seconds.
//'queueJobTtr' => 300,
// The maximum number of times to attempt retrying a failed queue job.
//'maxRetryAttempts' => 10,
// The maximum length of URIs that may be cached. Increasing this value requires manually updating the limit in the `uri` column of the `blitz_caches` database table.
//'maxUriLength' => 2048,
// The maximum length of index on the URI column.
//'maxUriIndexLength' => 767,
// The time in seconds to wait for mutex locks to be released.
//'mutexTimeout' => 1,
// The paths to executable shell commands.
//'commands' => [
// 'git' => '/usr/bin/git',
//],
// The name of the JavaScript event that will trigger a script inject. Note that changing this from the default value of `DOMContentLoaded` will force the script to be output inline, which requires `script-src 'unsafe-inline'` when using a Content Security Policy.
//'injectScriptEvent' => 'DOMContentLoaded',
// The position in the HTML of the injected script.
//'injectScriptPosition' => yii\web\View::POS_END,
],
];