Cap.FileCacheManagment 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Cap.FileCacheManagment --version 1.0.1
                    
NuGet\Install-Package Cap.FileCacheManagment -Version 1.0.1
                    
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.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cap.FileCacheManagment" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Cap.FileCacheManagment" />
                    
Project file
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.1
                    
#r "nuget: Cap.FileCacheManagment, 1.0.1"
                    
#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.1
                    
#: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.1
                    
Install as a Cake Addin
#tool nuget:?package=Cap.FileCacheManagment&version=1.0.1
                    
Install as a Cake Tool

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; }
    DateTime  Created { get; set; }
}

Cache

public class CacheLogBaseDto<T> : ILogBaseDto
{
    public string Id { get; set; }
    public T Data { get; set; }
    public DateTimeOffset ExpireDateTime { get; set; }
    public DateTime Created { get; set; } = DateTime.Now;
}

File

public class FileLogBaseDto<T>:ILogBaseDto
{
    public string Id { get; set; }
    public T Data { get; set; }
    public DateTime Created { get; set; } = DateTime.Now;
}

Repositories --> <Generic Repository>

Cache

public interface ICacheRepository<T>
{
    CacheLogBaseDto<T> GetById(string key, string id);
    List<CacheLogBaseDto<T>> GetAll(string key);
    CacheLogBaseDto<T> FirstOrDefault(Expression<Func<T, bool>> predicate,string key);
    List<CacheLogBaseDto<T>> GetAll(Expression<Func<T, bool>> predicate,string key);
    string Add(string key, T value, DateTimeOffset expirationTime);
    void Remove(string key, string id);
    void Clear(string key);
}

File

public interface ILogFileRepository<T>
{
    void Insert(string pathFile, T data);
    void Update(string Path, FileLogBaseDto<T> data);
    FileLogBaseDto<T> FirstOrDefault(Expression<Func<T, bool>> predicate, string path);
    List<FileLogBaseDto<T>> GetAll(string path);
    List<FileLogBaseDto<T>> GetAll(Expression<Func<T, bool>> predicate, string path);
    bool DeleteAll(string path, T? data);
}
Product 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.

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