mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added cache invalidation on updating newsletters (#14587)
- allows portal/apis to not show stale newsletter information
This commit is contained in:
parent
c1d4d9ccc6
commit
4f3743bb60
2 changed files with 11 additions and 1 deletions
|
@ -69,6 +69,9 @@ module.exports = {
|
||||||
|
|
||||||
add: {
|
add: {
|
||||||
statusCode: 201,
|
statusCode: 201,
|
||||||
|
headers: {
|
||||||
|
cacheInvalidate: true
|
||||||
|
},
|
||||||
options: [
|
options: [
|
||||||
'include',
|
'include',
|
||||||
'opt_in_existing'
|
'opt_in_existing'
|
||||||
|
@ -87,7 +90,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
edit: {
|
edit: {
|
||||||
headers: {},
|
headers: {
|
||||||
|
cacheInvalidate: true
|
||||||
|
},
|
||||||
options: [
|
options: [
|
||||||
'id',
|
'id',
|
||||||
'include'
|
'include'
|
||||||
|
|
|
@ -44,6 +44,7 @@ Object {
|
||||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||||
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
||||||
"vary": "Origin, Accept-Encoding",
|
"vary": "Origin, Accept-Encoding",
|
||||||
|
"x-cache-invalidate": "/*",
|
||||||
"x-powered-by": "Express",
|
"x-powered-by": "Express",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -94,6 +95,7 @@ Object {
|
||||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||||
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
||||||
"vary": "Origin, Accept-Encoding",
|
"vary": "Origin, Accept-Encoding",
|
||||||
|
"x-cache-invalidate": "/*",
|
||||||
"x-powered-by": "Express",
|
"x-powered-by": "Express",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -139,6 +141,7 @@ Object {
|
||||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||||
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
||||||
"vary": "Origin, Accept-Encoding",
|
"vary": "Origin, Accept-Encoding",
|
||||||
|
"x-cache-invalidate": "/*",
|
||||||
"x-powered-by": "Express",
|
"x-powered-by": "Express",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -317,6 +320,7 @@ Object {
|
||||||
"content-type": "application/json; charset=utf-8",
|
"content-type": "application/json; charset=utf-8",
|
||||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||||
"vary": "Origin, Accept-Encoding",
|
"vary": "Origin, Accept-Encoding",
|
||||||
|
"x-cache-invalidate": "/*",
|
||||||
"x-powered-by": "Express",
|
"x-powered-by": "Express",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -361,6 +365,7 @@ Object {
|
||||||
"content-type": "application/json; charset=utf-8",
|
"content-type": "application/json; charset=utf-8",
|
||||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||||
"vary": "Origin, Accept-Encoding",
|
"vary": "Origin, Accept-Encoding",
|
||||||
|
"x-cache-invalidate": "/*",
|
||||||
"x-powered-by": "Express",
|
"x-powered-by": "Express",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue