Devesprit.ImageProcessor & Devesprit.ImageServer

The Azure blob cache plugin is an extension to the caching mechanism which allows caching of images within AzureBlob Storage to serve via a content delivery network. This is extremely useful for load balanced or high traffic sites where images have to be served outwith the website for increased performance.

The caching mechanism will store processed image files from any allowable image location including but not limited to local, remote, and blob stored locations. The cache is self cleaning and will automatically update itself should a source image change. It is interchangeable with the default disk cache with very little configuration.



Upon installation the following will be added to the Cache.Config section in the configuration files.

Copy Code
<caching currentCache="AzureBlobCache">
      browserMaxDays separates the time to cache the image in the browser from the time to store
      the image in the cache
      folderDepth (Optional) sets the maximum number folder levels to nest the cached images. Defaults to 6.
      trimCache (Optional) whether to perform a cleanup of the cache when a new file is created. Defaults to true.
    <cache name="AzureBlobCache" type="Devesprit.ImageServer.Plugins.AzureBlobCache.AzureBlobCache, Devesprit.ImageServer.Plugins.AzureBlobCache"
           maxDays="365" browserMaxDays="7" folderDepth="6" trimCache="true">
        <!-- The Account, Container and CDN details -->
        <setting key="CachedStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=[CacheAccountName];AccountKey=[CacheAccountKey]"/>
        <setting key="CachedBlobContainer" value="cache"/>
        <!-- Whether to add the container name to the CDN url. Newer Azure formats require false. -->
        <setting key="UseCachedContainerInUrl" value="true"/>
        <!-- Full CDN root url e.g -->
        <setting key="CachedCDNRoot" value="[CdnRootUrl]"/>
        <!-- Optional setting for a timeout limit in milliseconds when attempting to communicate with the CDN url. -->
        <setting key="CachedCDNTimeout" value="1000"/>
            Optional settings for better identifcation of source images if stored in
            Azure blob storage.
        <setting key="SourceStorageAccount" value=""/>
        <setting key="SourceBlobContainer" value=""/>
            Optional settings facilitate streaming of the blob resource directly instead of a redirect. This is beneficial
            for CDN purposes but caution should be taken if not used with a CDN as it will add quite a bit of overhead
            to the site.
        <setting key="StreamCachedImage" value="false"/>