sdk-core
                                
                                
                                
                                    sdk-core copied to clipboard
                            
                            
                            
                        [Feature Request] Add TTL to ephemeral server download cache
Currently we cache the downloads in local filesystem indefinitely. For latest the file path is hardcoded and for SDK default we use the SDK name and version in the file path).
This could pose an issue since we'd like users to automatically get enhancements and bug fixes when we release new server versions.
Proposed solution
SDK exposes a TTL field in CachedDownload and checks the downloaded file's mtime to determine whether a new version should be downloaded.
For further optimization, the SDK could use If-Modified-Since or Etag headers to avoid downloading from the CDN if there's no new release, if no download is required, touch the downloaded file to avoid hitting the server unnecessarily.