What it means to setup S3 as cache to docs?

If I setup AWS S3 as cache to onlyoffice docs (Connecting Amazon S3 bucket as a cache to ONLYOFFICE Docs - ONLYOFFICE), do I still need to implement the status callback endpoint to sync docs, or this just means that the docs cache now is in S3 instead of in the document server file system? Can you elaborate more on this to fully understand this?

In other words Do this means that now doc editions will be temporally stored in S3 than in the local file system of the document server? and do we always need to implement the status callback endpoint to store the final edited version?

If this is the case then docs in the S3 cache are persisted permanently? Meaning, the files will continue to live on S3 cache as long as we don’t delete them?

Thanks!

Hello,
Cache is where Document Server stores edited documents, the final version will be saved to your storage (so, you would still need to have it built along with the callback). Unsuccessfully saved files (in case callback saving error occurs) are also stored in cache, they stay there until the saving is successful, there is no time limit. When a file is compiled (after the editing sessions was finished), Document Server sends status 2 message to callback handler (document is ready for saving) with the link to the compiled file in cache (Callback handler) and the storage downloads the file.
S3 option simply allows you to store cache not in the folder on the server, but outside.

The cache files have lifetime of 24 hours (86400 seconds) after editing is finished by default, it is defined by expire.files parameter within default.json (/etc/onlyoffice/documentserver/default.json, for Docker inside the container). The filesCron parameter is responsible for how often the check of lifetime expiration happens. If the parameter is set to 5 minutes, then every 5 minutes there will be a check if there is a file which is stored for 24 hours as defined by its lifetime setting, such a file will be deleted from S3.

@DmitriiV Super helpful, thanks!