mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
perf: Tell browsers to cache storage stats endpoint as it is cached
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
c3354e9c84
commit
40a416ba00
1 changed files with 3 additions and 1 deletions
|
|
@ -238,7 +238,9 @@ class ApiController extends Controller {
|
|||
*/
|
||||
public function getStorageStats($dir = '/'): JSONResponse {
|
||||
$storageInfo = \OC_Helper::getStorageInfo($dir ?: '/');
|
||||
return new JSONResponse(['message' => 'ok', 'data' => $storageInfo]);
|
||||
$response = new JSONResponse(['message' => 'ok', 'data' => $storageInfo]);
|
||||
$response->cacheFor(5 * 60);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue