ImageResizer.Plugins.HybridCache 5.0.8-preview05

Prefix Reserved
This is a prerelease version of ImageResizer.Plugins.HybridCache.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package ImageResizer.Plugins.HybridCache --version 5.0.8-preview05                
NuGet\Install-Package ImageResizer.Plugins.HybridCache -Version 5.0.8-preview05                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImageResizer.Plugins.HybridCache" Version="5.0.8-preview05" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ImageResizer.Plugins.HybridCache --version 5.0.8-preview05                
#r "nuget: ImageResizer.Plugins.HybridCache, 5.0.8-preview05"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ImageResizer.Plugins.HybridCache as a Cake Addin
#addin nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.8-preview05&prerelease

// Install ImageResizer.Plugins.HybridCache as a Cake Tool
#tool nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.8-preview05&prerelease                

ImageResizer.Plugins.HybridCache

This plugin is suggested for all ImageResizer installations. It caches image processing requests as static files and is essential for consistent low-latency responses and scalability.

HybridCache is our 7th-generation disk caching engine based on 13 years of large-scale production deployments.

HybridCache offers accurately bounded disk usage, can store mime-type metadata when needed, and uses a sharded, asynchronous write-ahead-log for scalability. Cache entries are written as separate files to improve OS level performance.

This plugin only works with the URL API, not the managed API.

Installation

  1. PM> Install-Package ImageResizer.Plugins.HybridCache
  2. In the <resizer><plugins> section of Web.config, insert <add name="HybridCache" />.
  3. (optional) In the <resizer> section of Web.config, insert <br /> <hybridCache cacheLocation="C:\imageresizercache\" cacheSizeMb="1,000" />.

Notes

  • <hybridCache cacheLocation="C:\imageresizercache\"/> defaults to a app-unique subfolder of the IIS user account's temp folder. Cannot be located in the project or a web-accessible folder.
  • <hybridCache cacheSizeMb="1,000" /> is in bytes and cannot be set below 9MB (9,000,000) or no files will be cached. 1GiB is the suggested minimum.
  • <hybridCache databaseShards="8" /> adjust the number of shards (and write ahead log groups) in the database. Delete the cache folder after changing this number. Don't change this number unless directed by support.
  • <hybridCache writeQueueMemoryMb="100" /> limits how much RAM can be used by the asynchronous write queue before making requests wait for caching writing to complete. (HybridCache writes cache entries in the background to improve latency). 100MB is the default and suggested minimum.
  • <hybridCache.evictionSweepSizeMb="1" /> determines the minimum amount of bytes to evict from the cache once a cleanup is triggered. 1MB is the default and suggested minimum.

Migrating from DiskCache or TinyCache

  • Delete your /imagecache/ folder (otherwise it will become publicly accessible!!!) (Actually, if installed, HybridCache will kill the application with an error message to prevent that - for all we know you resize images of passwords and have directory listing enabled)
  • Delete references to DiskCache and TinyCache from both nuget.config and Web.config
  • Install-Package ImageResizer.Plugins.HybridCache
  • Put <add name="HybridCache" /> in the <resizer><plugins> section of Web.config
  • Put <hybridCache cacheLocation="C:\imageresizercache\" cacheSizeMb="1,000" /> in the <resizer> section of Web.config. If you want to use a temp folder, omit cacheLocation.
  • HybridCache requires a cache folder outside of the web root. DiskCache did not support that.
  • HybridCache, unlike DiskCache, can precisely limit the cache size & disk utilization.
  • HybridCache uses a write-ahead log to prevent orphaned cache entries.
  • HybridCache can store the associated mime-type for cached files.

The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,

If you get this error, add <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/> to <system.web><compilation><assemblies> in web.config.

Example:

<system.web>
<compilation debug="true" targetFramework="4.8" >
    <assemblies>
        <add assembly="netstandard, Version=2.0.0.0, Culture=neutral,
        PublicKeyToken=cc7b13ffcd2ddd51"/>
    </assemblies>
</compilation>
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.13-preview09 117 9/30/2023
5.0.11-preview08 127 12/23/2022
5.0.10-preview07 107 11/17/2022
5.0.9-preview06 107 11/4/2022
5.0.8-preview05 98 11/4/2022
5.0.7-preview-04 117 10/14/2022
5.0.6-preview03 112 10/14/2022
5.0.5-preview02 111 9/29/2022
5.0.4-preview01 113 8/26/2022
5.0.3-preview04 111 8/26/2022
5.0.2-preview03 108 8/25/2022
5.0.1-preview02 129 8/25/2022