coda / packs-sdk

SDK for Coda Packs
https://coda.io/why-build-packs
MIT License
91 stars 26 forks source link

Allow setting a cache time when storing URLs #3101

Closed ekoleda-codaio closed 2 weeks ago

ekoleda-codaio commented 3 weeks ago

I had wanted to cache some large blobs I was storing, so I didn't have to refetch them on every sync. This PR adjusts signature of storeUrl to support a cacheTtlSecs fetch option. The implementation already seems to support this (we likely pass through all of the options) but adjusting the typing to indicate it's supported.

I also fixed an issue with the testing fetcher where it wasn't using the fetch options.