imazen / imageflow-dotnet-server

A super-fast image server to speed up your site - deploy as a microservice, serverless, or embeddable.
https://docs.imageflow.io
GNU Affero General Public License v3.0
252 stars 33 forks source link

Allow caching of unmodified (remote?) files #25

Closed jakenuts closed 4 years ago

jakenuts commented 4 years ago

Disk caching is great for minimizing redundant expensive operations. Retrieving images from remote sources can be more expensive than image manipulations so allowing unmodified images to be cached locally (ImageResizer feature) would be great.

ImageflowMiddleware.cs line 104

var diskCacheEnabled = diskCache != null && options.AllowDiskCaching && imageJobInfo.NeedsCaching();

ImageJobInfo.cs line 225

public bool NeedsCaching() { return HasParams || primaryBlob?.GetBlobResult()?.IsFile == false; }

jakenuts commented 4 years ago

Oy, so sorry for the back and forth, caching does appear to be working for unmodified remote blobs.