0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Updated to always invalidate cache on tier edit (#14267)

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

We were selectively invalidating cache on tier/product edit which was consistent with pattern for other APIs, but in case of tier/product, the model changed method always returns false due to how its setup. This change updates the edit to always invalidate cache, similar to tier add, to ensure sites don't see old tier values.
This commit is contained in:
Rishabh Garg 2022-03-04 21:17:30 +05:30 committed by GitHub
parent b03862d08a
commit 3fa836690e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -93,7 +93,9 @@ module.exports = {
options: [
'id'
],
headers: {},
headers: {
cacheInvalidate: true
},
validation: {
options: {
id: {
@ -108,11 +110,6 @@ module.exports = {
frame.options
);
if (model.wasChanged()) {
this.headers.cacheInvalidate = true;
} else {
this.headers.cacheInvalidate = false;
}
return model;
}
}

View file

@ -95,7 +95,9 @@ module.exports = {
options: [
'id'
],
headers: {},
headers: {
cacheInvalidate: true
},
validation: {
options: {
id: {
@ -112,11 +114,6 @@ module.exports = {
frame.options
);
if (model.wasChanged()) {
this.headers.cacheInvalidate = true;
} else {
this.headers.cacheInvalidate = false;
}
return model;
}
}