diff options
author | Cyrille Bollu <cyr.debian@bollu.be> | 2020-12-01 16:22:13 +0300 |
---|---|---|
committer | Cyrille Bollu <cyr.debian@bollu.be> | 2020-12-01 16:22:13 +0300 |
commit | 3dc7a522579c567a5e82aa075e710dee80e1bd5e (patch) | |
tree | 7a4f4bb6d14532b7e6ee05cd925842bec7f5ace0 /lib | |
parent | b4afd1347a14559848b52ac44425b382f2e05742 (diff) |
Adds caching for MessageController's getBody function
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Controller/MessagesController.php | 7 |
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; } /** |