Sylin.Koan.Cache.Adapter.Sqlite
1.0.0
dotnet add package Sylin.Koan.Cache.Adapter.Sqlite --version 1.0.0
NuGet\Install-Package Sylin.Koan.Cache.Adapter.Sqlite -Version 1.0.0
<PackageReference Include="Sylin.Koan.Cache.Adapter.Sqlite" Version="1.0.0" />
<PackageVersion Include="Sylin.Koan.Cache.Adapter.Sqlite" Version="1.0.0" />
<PackageReference Include="Sylin.Koan.Cache.Adapter.Sqlite" />
paket add Sylin.Koan.Cache.Adapter.Sqlite --version 1.0.0
#r "nuget: Sylin.Koan.Cache.Adapter.Sqlite, 1.0.0"
#:package Sylin.Koan.Cache.Adapter.Sqlite@1.0.0
#addin nuget:?package=Sylin.Koan.Cache.Adapter.Sqlite&version=1.0.0
#tool nuget:?package=Sylin.Koan.Cache.Adapter.Sqlite&version=1.0.0
Sylin.Koan.Cache.Adapter.Sqlite
Persistent Local Cache provider for Koan, backed by SQLite. Reference it and keep the normal AddKoan() boot;
SQLite automatically wins Local election over the built-in memory floor.
Install
dotnet add package Sylin.Koan.Cache.Adapter.Sqlite
builder.Services.AddKoan();
[Cacheable(300)]
public sealed class Todo : Entity<Todo> { }
No SQLite registration is required. The default database is .Koan/cache/cache.db.
Meaningful result
Run the application, save and read an Entity, then restart it. The elected Local cache remains queryable from the SQLite file without changing Entity code.
Configure only when needed
{
"Koan": {
"Cache": {
"Adapters": {
"Sqlite": {
"DatabasePath": "./state/cache.db"
}
}
}
}
}
The provider supports exact case-insensitive tags, binary payloads, bounded stale serving, durable persistence, and real sliding expiration. Existing pre-1.0 databases are upgraded in place: the sliding-expiry column and normalized tag index are added, and legacy comma-delimited tags are migrated.
Guarantees and limits
SQLite is a Local tier: it persists across process restarts but is not a shared multi-node cache. Use it when one process needs durable local caching or offline-friendly behavior. Add a Remote adapter for a shared layer.
Boot reporting exposes the selected provider and database path. CacheHealthCheck performs a real sentinel
write/read/remove against the selected tier.
See TECHNICAL.md for schema and migration behavior.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Data.Sqlite (>= 10.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.DependencyModel (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- SQLitePCLRaw.lib.e_sqlite3 (>= 3.53.3)
- Sylin.Koan.Cache (>= 1.0.0 && < 2.0.0)
- Sylin.Koan.Cache.Abstractions (>= 1.0.0 && < 2.0.0)
- Sylin.Koan.Core (>= 1.0.0 && < 2.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.