fastboot-app-server icon indicating copy to clipboard operation
fastboot-app-server copied to clipboard

cache expiration after download

Open sescobb27 opened this issue 7 years ago • 0 comments

hi, I would like to have a custom hook to get notified when a download is finished or have access to the caching layer from the downloader, something like the following example, then we can get the new content as fast as we can

const downloader = new Downloader({
  download(){
    downloadPromise.then(() => this.cache.expire(`${key}:${path}`))
  }
})

// OR

let server = new FastBootAppServer({
  ...,
  afterDownload: function () {
    return this.cache.expire(`${key}:${path}`)
  }
})

I think this expiration feature is not present yet, any thoughts? let me know if that sounds good to you and if I can help implementing this. thanks

sescobb27 avatar Apr 19 '17 00:04 sescobb27