PolyCache 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PolyCache --version 1.0.0                
NuGet\Install-Package PolyCache -Version 1.0.0                
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="PolyCache" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PolyCache --version 1.0.0                
#r "nuget: PolyCache, 1.0.0"                
#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 PolyCache as a Cake Addin
#addin nuget:?package=PolyCache&version=1.0.0

// Install PolyCache as a Cake Tool
#tool nuget:?package=PolyCache&version=1.0.0                

PolyCache

A Distributed Cache manager package for .Net Core Projects.

Give a Star! ⭐

If you like or are using this project to learn or using PolyCache package, please give it a star. Thanks!

Installing PolyCache

> Install-Package PolyCache

Registering PolyCache

in Startup → ConfigureServices

> services.AddPolyCache(Configuration);

DistributedCacheConfig

DistributedCacheType

You can choose one of the implementations:
  • Redis
  • Memory
  • SQL Server

SchemaName (optional)

This setting is only used in conjunction with SQL Server.

TableName (optional)

This setting is only used in conjunction with SQL Server. SQL Server database name.

Put the following configuration in appsettings.json.

"CacheConfig": {
    "DefaultCacheTime": 60,
    "ShortTermCacheTime": 3,
    "BundledFilesCacheTime": 120
  },
  "DistributedCacheConfig": {
    "DistributedCacheType": "redis",
    "Enabled": true,
    "ConnectionString": "127.0.0.1:6379,ssl=False",
    "SchemaName": "dbo",
    "TableName": "DistributedCache"
  }

Inject IStaticCacheManager interface and use it

The source of a project that used PolyCache is also included.

Sample For Use PolyCache

Redis Docker Compose

for using redis, do the following to install

1. Install Docker on your OS(operating system)
2. Download and put the redis-docker-compose.yml file in a path of your OS(There is inside the sample project)
3. Open your Terminal as administrator
4. Go to the redis-docker-compose.yml file path
5. Run docker-compose -f redis-docker-compose.yml up
6. Now Redis is ready on Docker
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. 
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 (1)

Showing the top 1 popular GitHub repositories that depend on PolyCache:

Repository Stars
omid-ahmadpour/CleanArchitecture-Template
This stands as a comprehensive solution template that embodies the principles of Clean Architecture, seamlessly integrated with the prowess of CQRS implementation, all within the ASP.NET Core framework.
Version Downloads Last updated
1.2.1 309 5/8/2024
1.2.0 132 2/24/2024
1.1.0 1,339 9/22/2023
1.0.1 9,308 8/14/2021
1.0.0 416 4/10/2021