Trailing slashes for cache invalidation headers

issue #963
This commit is contained in:
Hannah Wolfe 2013-10-02 16:14:35 +01:00
parent 70861f6fcd
commit ba0b6982a4

View File

@ -321,9 +321,9 @@ function invalidateCache(req, res, result) {
cacheInvalidate = "/, /page/*, /rss/, /rss/*";
if (id) {
if (result.toJSON) {
cacheInvalidate += ', /' + result.toJSON().slug;
cacheInvalidate += ', /' + result.toJSON().slug + '/';
} else {
cacheInvalidate += ', /' + result.slug;
cacheInvalidate += ', /' + result.slug + '/';
}
}
}