mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 09:06:38 +00:00
tiels are cached and reused properly
This commit is contained in:
@@ -84,40 +84,6 @@ public class GoogleMapsDownloaderV2
|
||||
var response = await httpClient.GetAsync(url, token);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
_logger.LogInformation("=== HTTP Response Headers from Google Maps ===");
|
||||
_logger.LogInformation("Status Code: {StatusCode}", response.StatusCode);
|
||||
|
||||
foreach (var header in response.Headers)
|
||||
{
|
||||
_logger.LogInformation("Header: {Key} = {Value}", header.Key, string.Join(", ", header.Value));
|
||||
}
|
||||
|
||||
foreach (var header in response.Content.Headers)
|
||||
{
|
||||
_logger.LogInformation("Content Header: {Key} = {Value}", header.Key, string.Join(", ", header.Value));
|
||||
}
|
||||
|
||||
if (response.Headers.ETag != null)
|
||||
{
|
||||
_logger.LogInformation("*** ETag Found: {ETag}", response.Headers.ETag.Tag);
|
||||
}
|
||||
|
||||
if (response.Content.Headers.LastModified.HasValue)
|
||||
{
|
||||
_logger.LogInformation("*** Last-Modified Found: {LastModified}", response.Content.Headers.LastModified.Value);
|
||||
}
|
||||
|
||||
if (response.Headers.CacheControl != null)
|
||||
{
|
||||
_logger.LogInformation("*** Cache-Control: MaxAge={MaxAge}, Public={Public}, Private={Private}, MustRevalidate={MustRevalidate}",
|
||||
response.Headers.CacheControl.MaxAge,
|
||||
response.Headers.CacheControl.Public,
|
||||
response.Headers.CacheControl.Private,
|
||||
response.Headers.CacheControl.MustRevalidate);
|
||||
}
|
||||
|
||||
_logger.LogInformation("=== End of Headers ===");
|
||||
|
||||
var imageBytes = await response.Content.ReadAsByteArrayAsync(token);
|
||||
await File.WriteAllBytesAsync(filePath, imageBytes, token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user