Know if study is cached

How can we know if there is a compressed file (.zip) of a study in the cache?

We looked in the Rest API and we did not find a mechanism to know if the .zip exists in the cache or not.

Orthanc never caches the .ZIP files it generates.

You might be looking for the asynchronous generation of archives:
https://book.orthanc-server.com/users/advanced-rest.html#example-asynchronous-generation-of-an-archive

I mean to know which studies are already compressed and stored, to download them again and not create them again: https://hg.orthanc-server.com/orthanc/file/Orthanc-1.10.1/OrthancServer/Resources/Configuration.json#l709

Hello!

If what Sebastien says is true, then I think MediaArchiveSize simply means the number of files Orthanc can handle in parallel and asynchronous mode, and delete after the job is finished (presumably after the file is downloaded).

A sexta-feira, 6 de maio de 2022 à(s) 16:13:16 UTC+1, rma...@gmail.com escreveu:

Hello,

You can simply use the “/jobs?expand” URI to get information about all the jobs that have been handled in Orthanc:
https://api.orthanc-server.com/#tag/Jobs/paths/~1jobs/get

Secondly, locate all the jobs whose “Type” equals “Archive” and whose “Status” equals “Success”. Finally, try to retrieve the “/jobs/…/archive” item, as described here:
https://book.orthanc-server.com/users/advanced-rest.html#example-asynchronous-generation-of-an-archive

If the request to “/jobs/…/archive” succeeds, you have located one already archived DICOM resource.

Sébastien-

Thanks Sébastien. We will try this approch.

Rafik