mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-14 07:48:46 +02:00
ruby : refine HTTP cache feature (#3109)
* Use cache file when model host doesn't support if-modified-since
* Update gem date
* Revert "ruby : ignore "Downloading" output in test_log_suppress (#3106)"
This reverts commit edbd4cb7f5
.
This commit is contained in:
@ -55,6 +55,8 @@ module Whisper
|
||||
when Net::HTTPNotModified
|
||||
# noop
|
||||
when Net::HTTPOK
|
||||
return if !response.key?("last-modified") && cache_path.exist?
|
||||
|
||||
download response
|
||||
when Net::HTTPRedirection
|
||||
request URI(response["location"]), headers
|
||||
|
Reference in New Issue
Block a user