Cap.FileCacheManagment
1.0.4
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 Cap.FileCacheManagment --version 1.0.4
NuGet\Install-Package Cap.FileCacheManagment -Version 1.0.4
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="Cap.FileCacheManagment" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cap.FileCacheManagment" Version="1.0.4" />
<PackageReference Include="Cap.FileCacheManagment" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cap.FileCacheManagment --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cap.FileCacheManagment, 1.0.4"
#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.
#:package Cap.FileCacheManagment@1.0.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cap.FileCacheManagment&version=1.0.4
#tool nuget:?package=Cap.FileCacheManagment&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
To use this package, simply add the AddLogFileCacheService() service to the Program.cs file and all Repositories and Services will be injected by default.
Dependecny injection in cSharp
public class Program
{
private static void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddLogFileCacheService();
}
}
BaseDto --> <Generic Type>
Common Dto
public interface ILogBaseDto
{
string Id { get; set; }
public string? CreatedBy { get; set; }
public DateTime Created { get; set; }
public string? ModifyBy { get; set; }
public DateTime? Modified { get; set; }
}
Repositories --> <Generic Repository>
Cache
public interface ICacheRepository<T>
where T : class, ILogBaseDto
{
Task<LogBaseDto<T>> GetByIdAsync(string key, string id);
Task<List<LogBaseDto<T>>> GetAllAsync(string key);
Task<LogBaseDto<T>> FirstOrDefaultAsync(Expression<Func<T, bool>> predicate, string key);
Task<List<LogBaseDto<T>>> GetAllAsync(Expression<Func<T, bool>> predicate, string key);
Task<string> AddAsync(string key, T value, DateTimeOffset expirationTime);
Task<bool> UpdateAsync(Expression<Func<T, bool>> predicate, string key, T value, DateTimeOffset expirationTime);
Task<bool> RemoveAsync(string key, string id);
Task<bool> ClearAsync(string key);
Task<bool> RestorBackupAsync(string key, DateTimeOffset expirationTime);
}
injection Repositories
public static void AddLogFileCacheService(this IServiceCollection services,bool backupFile=true)
{
services.TryAdd(ServiceDescriptor.Singleton(typeof(ICacheRepository<>), typeof(CacheRepository<>)));
services.AddMemoryCache();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- JsonFlatFileDataStore (>= 2.4.2)
- Microsoft.Extensions.Caching.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Caching.Memory (>= 6.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 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 |
|---|---|---|
| 1.1.2 | 227 | 10/26/2025 |
| 1.1.1 | 215 | 10/1/2025 |
| 1.1.0 | 214 | 10/1/2025 |
| 1.0.10 | 210 | 10/1/2025 |
| 1.0.9 | 218 | 10/1/2025 |
| 1.0.8 | 222 | 6/25/2025 |
| 1.0.7 | 201 | 6/25/2025 |
| 1.0.6 | 201 | 6/25/2025 |
| 1.0.5 | 211 | 6/24/2025 |
| 1.0.4 | 133 | 6/21/2025 |
| 1.0.3 | 296 | 6/9/2025 |
| 1.0.2 | 280 | 6/8/2025 |
| 1.0.1 | 192 | 6/8/2025 |
| 1.0.0 | 185 | 6/8/2025 |