e6-cache works by forwarding the users request, which means that it should never require any client changes, and should work on anything that abides by the offical api.
The core concept of the implementation looks like this:
- Receive an api request
- Forward the request to the target e6-based service (While checking for the Proxy Auth for example)
- Capture the response
- Modify the response and save it in the DB (URIs dont change in the DB)
- Return the modified response to the client
File Proxying works like this:
- Check the Signature and decode the base64 encoded url
- Check in S3 if the file exists
- If not, then request it and save it while forwarding it to the client. If it exist than stream it to the client from S3.
The update_openapi.sh script:
- Updates the openai.yaml file from another repo