ImageResizer.Plugins.HybridCache
5.0.2-preview03
Prefix Reserved
See the version list below for details.
dotnet add package ImageResizer.Plugins.HybridCache --version 5.0.2-preview03
NuGet\Install-Package ImageResizer.Plugins.HybridCache -Version 5.0.2-preview03
<PackageReference Include="ImageResizer.Plugins.HybridCache" Version="5.0.2-preview03" />
paket add ImageResizer.Plugins.HybridCache --version 5.0.2-preview03
#r "nuget: ImageResizer.Plugins.HybridCache, 5.0.2-preview03"
// Install ImageResizer.Plugins.HybridCache as a Cake Addin #addin nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.2-preview03&prerelease // Install ImageResizer.Plugins.HybridCache as a Cake Tool #tool nuget:?package=ImageResizer.Plugins.HybridCache&version=5.0.2-preview03&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 offers accurately bounded disk usage, capable of storing mime-type metadata when needed, and utilizing a sharded 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\" cacheMaxSizeBytes="1,000,000,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 cacheMaxSizeBytes=""1,000,000,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 queueSizeLimitInBytes="100,000,000" />
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.minCleanupBytes="1,000,000" />
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\" cacheMaxSizeBytes="1,000,000,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
- Imageflow.AllPlatforms (>= 0.8.4)
- Imageflow.Net (>= 0.8.4)
- ImageResizer (>= 5.0.2-preview03)
- 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 |