forked from tractorcow/silverstripe-dynamiccache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamiccache.yml
58 lines (58 loc) · 2.62 KB
/
dynamiccache.yml
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
---
Name: dynamiccache
---
TractorCow\DynamicCache\DynamicCache:
# Global override. Turn to false to turn caching off.
enabled: true
# If a header should be used to opt in to caching, set the regular expression
# here which will match the specified header.
optInHeader: null
# If a header should be used to explicitly disable caching for a cache, set the
# regular expression here which will be used to match the specified header
optOutHeader: '/(^X\-DynamicCache\-OptOut)/'
# Header to use by the module attempting to opt out
optOutHeaderString: 'X-DynamicCache-OptOut: true'
# Status codes that should be cached
optInResponseCodes:
- 200
- 203
- 204
- 205
- 300
- 301
- 404
- 410
# Status codes that should not be cached (overrides optInResponseCodes)
optOutResponseCodes: null
# Header prefix to use for reporting cache results
responseHeader: 'X-DynamicCache'
# If caching should be limited only to specified urls set the regular expression
# here which will be used to match those urls
optInURL: null
# If caching should be disabled for specified urls set the regular expression here
# which will be used to match those urls
optOutURL: '/(^\/admin)|(^\/dev($|\/))|(\/[A-Z])/'
# Determine if caching should be separated for different hostnames. Important if
# running off a system that serves different content for different hostname, but
# still uses the same backend, such as the subsites module
segmentHostname: true
# Determine if caching should be enabled during ajax
enableAjax: false
# SilverStripe\Control\Directory where file-based caches are stored (either absolute, or relative to TEMP_FOLDER)
# Allows usage of %BASE_PATH% and %ASSETS_PATH% placeholders.
# Please ensure that the folder is either located outside of the webroot, or appropriately secured.
cacheDir: 'dynamic_cache'
# Duration of the page cache, in seconds (3600 seconds = 1 hour)
cacheDuration: 3600
# Clear cache on write (any DataObject using `DynamicCacheDataObjectExtension`)
# Set this to false so that caches are only cleared manually or after the cacheDuration.
cacheClearOnWrite: true
# Determines which headers should also be cached. X-Include-CSS and other relevant
# headers can be essential in instructing the front end to include specific
# resource files
cacheHeaders: '/^((X\-)|(Content\-Type)|(Cache\-Control)|(Etag)|(Expires)|(Last\-Modified)|(Location))/i'
# If you wish to override the cache configuration, then change this to another
# backend, and initialise a new SS_Cache backend in your _config file
cacheBackend: 'TractorCow\DynamicCache\DynamicCache'
# Specify page types to skip caching for
ignoredPages: []