ImageResizer.Plugins.HybridCache
5.0.7-preview-04
Prefix Reserved
See the version list below for details.
dotnet add package ImageResizer.Plugins.HybridCache --version 5.0.7-preview-04
NuGet\Install-Package ImageResizer.Plugins.HybridCache -Version 5.0.7-preview-04
<PackageReference Include="ImageResizer.Plugins.HybridCache" Version="5.0.7-preview-04" />
paket add ImageResizer.Plugins.HybridCache --version 5.0.7-preview-04
#r "nuget: ImageResizer.Plugins.HybridCache, 5.0.7-preview-04"
// Install ImageResizer.Plugins.HybridCache as a Cake Addin #addin nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.7-preview-04&prerelease // Install ImageResizer.Plugins.HybridCache as a Cake Tool #tool nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.7-preview-04&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
PM> Install-Package ImageResizer.Plugins.HybridCache
- In the
<resizer><plugins>
section ofWeb.config
, insert<add name="HybridCache" />
. - (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
andTinyCache
from both nuget.config and Web.config Install-Package ImageResizer.Plugins.HybridCache
- Put
<add name="HybridCache" />
in the<resizer><plugins>
section ofWeb.config
- Put
<hybridCache cacheLocation="C:\imageresizercache\" cacheSizeMb="1,000" />
in the<resizer>
section ofWeb.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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- ImageResizer (>= 5.0.7-preview-04)
- Imazen.Common (>= 0.7.6)
- Imazen.HybridCache (>= 0.7.6)
- Microsoft.Extensions.Configuration.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.2.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Primitives (>= 2.2.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.1)
- System.Numerics.Vectors (>= 4.4.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.1)
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 |