Skip to content

Commit 414635e

Browse files
Update for .NET 9/10 support and improve docs & packaging
Project now targets .NET 9.0 and 10.0, with package references updated to 9.0.0 versions. Added NuGet metadata for packaging. Introduced new using statements for validation and options. README clarified requirements and installation instructions. Support .NET 9.0, update deps, and improve docs Updated project to target both .NET 9.0 and 10.0, downgraded Microsoft.Extensions.* dependencies to 9.0.0 for compatibility, and added NuGet package metadata. Revised README to clarify .NET 9.0+ requirements and improved installation instructions. Added using directives in CacheServiceExtensions.cs for options and validation support.
1 parent 0510a6f commit 414635e

3 files changed

Lines changed: 32 additions & 19 deletions

File tree

AspNetCoreCacheKit.csproj

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
87

9-
<ItemGroup>
10-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.3" />
11-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.3" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.3" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.3" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.3" />
15-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
16-
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.3" />
17-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.3" />
18-
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="10.0.3" />
19-
</ItemGroup>
8+
<IsPackable>true</IsPackable>
9+
<PackageId>AspNetCoreCacheKit</PackageId>
10+
<Version>1.0.0</Version>
11+
<Authors>Simone Marano</Authors>
12+
<Description>Modern caching library for ASP.NET Core with group keys and validation</Description>
13+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
14+
<PackageTags>cache;aspnetcore;memorycache</PackageTags>
15+
<RepositoryUrl>https://github.com/simoneM93/AspNetCoreCacheKit</RepositoryUrl>
16+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
22+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
23+
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" />
24+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
25+
</ItemGroup>
2026

2127
</Project>

Extensions/CacheServiceExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
using AspNetCoreCacheKit.Models;
33
using Microsoft.Extensions.Configuration;
44
using Microsoft.Extensions.DependencyInjection;
5+
using Microsoft.Extensions.Options;
6+
using System.ComponentModel.DataAnnotations;
7+
using System.Diagnostics.CodeAnalysis;
58

69
namespace AspNetCoreCacheKit.Extensions
710
{

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AspNetCoreCacheKit
22

3-
[![NuGet](https://img.shields.io/nuget/v/AspNetCoreCacheKit.svg)](https://www.nuget.org/packages/AspNetCoreCacheKit) [![.NET](https://github.com/simoneM93/AspNetCoreCacheKit/actions/workflows/dotnet.yml/badge.svg)](https://github.com/simoneM93/AspNetCoreCacheKit/actions)
3+
[![NuGet](https://img.shields.io/nuget/v/AspNetCoreCacheKit.svg)](https://www.nuget.org/packages/AspNetCoreCacheKit)
44

55
A modern caching library for ASP.NET Core featuring **group-based keys**, configuration validation, and simplified overloads.
66

@@ -17,8 +17,8 @@ A modern caching library for ASP.NET Core featuring **group-based keys**, config
1717

1818
| Requirement | Minimum Version |
1919
|-------------|-----------------|
20-
| .NET | 8.0 or 9.0 |
21-
| ASP.NET Core | 8.0+ |
20+
| .NET | 9.0 |
21+
| ASP.NET Core | 9.0+ |
2222

2323
## 🚀 Installation
2424

@@ -42,7 +42,11 @@ dotnet add package Microsoft.Extensions.Options.DataAnnotations
4242

4343
### 2. Register Services
4444
```csharp
45+
// With config
4546
builder.Services.AddAspNetCoreCacheKit(builder.Configuration);
47+
48+
// Only defaults (Without appsettings)
49+
builder.Services.AddAspNetCoreCacheKit();
4650
```
4751

4852
### 3. Use in Controller/Service

0 commit comments

Comments
 (0)