LiteAPI.Cache
1.1.2
dotnet add package LiteAPI.Cache --version 1.1.2
NuGet\Install-Package LiteAPI.Cache -Version 1.1.2
<PackageReference Include="LiteAPI.Cache" Version="1.1.2" />
<PackageVersion Include="LiteAPI.Cache" Version="1.1.2" />
<PackageReference Include="LiteAPI.Cache" />
paket add LiteAPI.Cache --version 1.1.2
#r "nuget: LiteAPI.Cache, 1.1.2"
#:package LiteAPI.Cache@1.1.2
#addin nuget:?package=LiteAPI.Cache&version=1.1.2
#tool nuget:?package=LiteAPI.Cache&version=1.1.2
LiteAPI.Cache - JustCache
GC-free, cross-platform in-memory cache for .NET backed by Rust.
JustCache is a high-performance memory cache system built to bypass .NET's garbage collector by leveraging native Rust memory management. Designed for low-latency, high-throughput scenarios where predictability and performance are essential.
๐ Key Features
- โก GC-Free: No garbage collection pressure in .NET
- ๐ง Native performance using Rust under the hood
- ๐ผ Cross-platform: Supports Windows, Linux, and macOS
- ๐ Thread-safe read/write access
- ๐พ Supports strings, byte arrays, and JSON-serializable objects
- ๐งฉ Interop via NativeAOT or P/Invoke
- ๐ก๏ธ Safe memory management without leaks
๐ฆ Installation
Install the NuGet package:
dotnet add package LiteAPI.Cache
๐ง Requires a precompiled native Rust dynamic library. See the documentation or GitHub repository for details.
โ๏ธ Usage
- Initialize the cache at application startup
- Set/Get data by key (supports string, bytes, and object types)
- Remove individual keys or clear all
- Interop with Rust is handled internallyโno manual marshaling needed
using LiteAPI.Cache;
string key = "example_key";
Student student = Student.Random(1);
// Initialize the cache and perform operations
JustCache.Initialize();
// Set an object in the cache
JustCache.SetObject(key, student);
// Retrieve the object from the cache
student = JustCache.GetObject<Student>(key) ?? Student.Random(2);
// Display the retrieved object
Console.WriteLine(student);
// Remove the object from the cache
JustCache.Remove(key);
// Clear all cached objects
JustCache.ClearAll();
๐ง Why JustCache?
- ๐ Ultra-fast native cache access
- โ No impact on .NET GC or memory fragmentation
- ๐งฉ Drop-in utility for microservices, real-time systems, or edge apps
- ๐ Useful for caching config, lookup tables, auth sessions, and more
๐ชช License
MIT License ยฉ 2025 LiteAPI
๐ฌ Feedback
Found a bug or want a feature? Open an issue or PR on GitHub.
๐ ๏ธ Contributing
We welcome contributions! Please see the CONTRIBUTING.md for guidelines.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
add linux support