Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bollu <cyr.debian@bollu.be>2020-12-01 16:22:13 +0300
committerCyrille Bollu <cyr.debian@bollu.be>2020-12-01 16:22:13 +0300
commit3dc7a522579c567a5e82aa075e710dee80e1bd5e (patch)
tree7a4f4bb6d14532b7e6ee05cd925842bec7f5ace0 /lib/Controller/MessagesController.php
parentb4afd1347a14559848b52ac44425b382f2e05742 (diff)
Adds caching for MessageController's getBody function
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-xlib/Controller/MessagesController.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index c366fcd34..b46b4e10d 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -247,7 +247,12 @@ class MessagesController extends Controller {
$json['mailboxId'] = $mailbox->getId();
$json['databaseId'] = $message->getId();
- return new JSONResponse($json);
+ $response = new JSONResponse($json);
+
+ // Enable caching
+ $response->cacheFor(60 * 60);
+
+ return $response;
}
/**