0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Updated cache invalidation handling on link edit (#15718)

refs https://github.com/TryGhost/Team/issues/2158

- the cache invalidation header returned should be specific to the email links pattern, otherwise it blows entire cache on every link edit
This commit is contained in:
Rishabh Garg 2022-10-28 02:48:42 +05:30 committed by GitHub
parent d10d4390f0
commit 83d89ef077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
const linkTrackingService = require('../../services/link-tracking');
const INVALIDATE_ALL_REDIRECTS = '/r/*';
module.exports = {
docName: 'links',
@ -25,7 +26,7 @@ module.exports = {
bulkEdit: {
statusCode: 200,
headers: {
cacheInvalidate: true
cacheInvalidate: INVALIDATE_ALL_REDIRECTS
},
options: [
'filter'