ImageResizer.Plugins.HybridCache
5.0.13-preview09
Prefix Reserved
dotnet add package ImageResizer.Plugins.HybridCache --version 5.0.13-preview09
NuGet\Install-Package ImageResizer.Plugins.HybridCache -Version 5.0.13-preview09
<PackageReference Include="ImageResizer.Plugins.HybridCache" Version="5.0.13-preview09" />
paket add ImageResizer.Plugins.HybridCache --version 5.0.13-preview09
#r "nuget: ImageResizer.Plugins.HybridCache, 5.0.13-preview09"
// Install ImageResizer.Plugins.HybridCache as a Cake Addin #addin nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.13-preview09&prerelease // Install ImageResizer.Plugins.HybridCache as a Cake Tool #tool nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.13-preview09&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 MiB and cannot be set below 9 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.13-preview09)
- Imazen.Common (>= 0.8.2)
- Imazen.HybridCache (>= 0.8.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1)
- Microsoft.Extensions.Primitives (>= 7.0.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
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 | 122 | 9/30/2023 |
5.0.11-preview08 | 129 | 12/23/2022 |
5.0.10-preview07 | 109 | 11/17/2022 |
5.0.9-preview06 | 109 | 11/4/2022 |
5.0.8-preview05 | 100 | 11/4/2022 |
5.0.7-preview-04 | 119 | 10/14/2022 |
5.0.6-preview03 | 114 | 10/14/2022 |
5.0.5-preview02 | 113 | 9/29/2022 |
5.0.4-preview01 | 115 | 8/26/2022 |
5.0.3-preview04 | 113 | 8/26/2022 |
5.0.2-preview03 | 112 | 8/25/2022 |
5.0.1-preview02 | 131 | 8/25/2022 |