CachedQueries 1.0.9
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CachedQueries --version 1.0.9
NuGet\Install-Package CachedQueries -Version 1.0.9
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="CachedQueries" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CachedQueries --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CachedQueries, 1.0.9"
#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 CachedQueries as a Cake Addin #addin nuget:?package=CachedQueries&version=1.0.9 // Install CachedQueries as a Cake Tool #tool nuget:?package=CachedQueries&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CachedQueries
A library provides IQueryable results caching with smart invalidation.
Setup
Setup with DI
services.AddQueriesCaching(options =>
options
.UseCache<DistributedCache>()
.UseEntityFramework());
...
app.UseQueriesCaching();
Or Setup with static class
CacheManager.Cache = new MyCacheImplementation();
CacheManager.CacheKeyFactory = new MyCacheKeyFactory();
Usage
Cache collection
var results = context.Blogs
.Include(x => x.Posts)
.ToCachedListAsync(cancellationToken);
Cache item
var results = context.Blogs
.Include(x => x.Posts)
.CachedFirstOrDefaultAsync(x => x.Id == request.Id, cancellationToken);
Invalidate cache
By default, all invalidation tags retrieved from Include and ThenInclude as navigation properties type names. To invalidate cache just call this extension before context save changes.
await context.ChangeTracker.ExpireEntitiesCacheAsync();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
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 |
---|---|---|
2.0.0 | 2,012 | 10/18/2024 |
1.0.18 | 2,640 | 7/5/2024 |
1.0.17 | 334 | 2/7/2023 |
1.0.16 | 74,368 | 1/31/2023 |
1.0.15 | 655 | 1/29/2023 |
1.0.14 | 1,104 | 1/25/2023 |
1.0.13 | 3,849 | 1/5/2023 |
1.0.12 | 4,381 | 12/7/2022 |
1.0.11 | 6,663 | 10/21/2022 |
1.0.10 | 11,213 | 7/14/2022 |
1.0.9 | 1,977 | 7/1/2022 |
1.0.8 | 425 | 7/1/2022 |
1.0.7 | 430 | 7/1/2022 |
1.0.6 | 12,021 | 4/11/2022 |
1.0.5 | 1,865 | 3/4/2022 |
1.0.4 | 734 | 2/24/2022 |
1.0.3 | 433 | 2/22/2022 |
1.0.2 | 436 | 2/22/2022 |
1.0.1 | 499 | 2/22/2022 |
1.0.0 | 536 | 2/22/2022 |