-
-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Labels
enhancementNew feature or requestNew feature or request
Description
A caching logic, similar to the PeerCache local temporary cache, is to be used.
For a given URI, e.g. https://mormotcache.ad.company.com/*, we redirect to another server
So that e.g.
https://mormotcache.ad.company.com/https/srvorigin.ad.company.com/application/file
will trigger the following process:
- make a HEAD
https://srvorigin.ad.company.com/application/file - compute a hash of its URI + last-modify = HASH (not content-length because it may not be available)
- check for a local file name from this HASH
4a) if the file exists, change its timestamp to the current time, and serve it to the client
4b) if the file does not exist, start downloading from GEThttps://srvorigin.ad.company.com, serve it in "progressive" mode (like PeerCache) to the client, then eventually copy the file to the local temporary folder - once in a while, check for deprecated files in the local temporary folder
OnRemoteUri event callback could check for the remote URI validity, with any additional information (e.g. TLS client certificate) for both HEAD and GET.
We can't directly reuse the PeerCache logic for this process, because there is no content hashing, and the actual usecase is not the same.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request