mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 06:37:56 -04:00
Merge pull request #45957 from nextcloud/perf/cache-storage-stats-header
perf: Tell browsers to cache storage stats endpoint as it is cached
This commit is contained in:
commit
ab8556872e
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