diff --git a/src/main/java/sirius/web/http/Response.java b/src/main/java/sirius/web/http/Response.java index 8836809c3..c65125f2e 100644 --- a/src/main/java/sirius/web/http/Response.java +++ b/src/main/java/sirius/web/http/Response.java @@ -822,7 +822,8 @@ public void redirectPermanently(String url) { private void performRedirect(String url, HttpResponseStatus status) { if (cacheSeconds == null || cacheSeconds == 0) { userMessagesCache.cacheUserMessages(webContext); - } else { + } + if (cacheSeconds != null) { setDateAndCacheHeaders(System.currentTimeMillis(), cacheSeconds, isPrivate); }