Where Squirix Fits
Use Squirix when separate .NET processes need to share cached values. Two ASP.NET Core instances can read the same cached product description, or a background worker can cache a value for a web app to read later. The apps connect to a self-hosted cache server over HTTPS gRPC.
Requirements and Limits
- If only one process needs the values, an in-process cache avoids a separate server and network requests.
- Squirix is an early preview. Evaluate it with development workloads before planning adoption.
- Keep authoritative data in a store that meets your transaction and recovery requirements. This preview provides no multi-key transactions or atomic updates across owners.
- Routing is static, with no automatic rebalancing or membership-driven routing.
Choose an Integration
Typed Cache With the Squirix SDK
The Squirix SDK targets .NET 10 and exposes typed ICache<T> entries. For cache-aside, look up a value with
GetValueAsync, then load it from the source on a miss and store it with SetAsync.
Set a relative lifetime or an absolute expiration time. Remove or replace entries when the source changes
and the app needs the new value before expiration.
A GetOrAddAsync factory may run in more than one application instance at the same time.
Use a factory that is safe to call concurrently.
- Run the two-process console example.
- Share typed entries between two ASP.NET Core instances using the preview.10 SDK.
- Read the Client API guide.
Shared L2 With HybridCache
If your ASP.NET Core app already uses HybridCache, register Squirix as its shared IDistributedCache
backend with the Squirix preview.11 adapter. Each app instance keeps its own in-memory L1.
Persistence and Replication
The quickstart uses one in-memory server. To test recovery after a restart, enable journal and snapshot persistence. Choose replication separately.
When a key is replicated across three or more nodes, a write succeeds after a majority of its replica group commits it. With three replicas, two must commit. The group stops accepting writes when it loses its majority. Each replica group has its own write quorum.
Automatic failover is opt-in and requires at least three replicas. Enable quorum reads when the leader must confirm its authority before answering.
Review configuration options and read the preview.10 consistency guarantees before choosing a topology.
Compare Related Projects
Compare the client API, write guarantees, and self-hosted licensing. Squirix includes majority-commit writes in its free Apache-2.0 release.
| Project | Client API | Replication and writes | Self-hosted licensing |
|---|---|---|---|
| Squirix | ICache<T> over gRPC |
When a key is replicated across three or more nodes, a write succeeds after a majority of those nodes commit it. Automatic failover and quorum reads are opt-in. | Free · Apache-2.0. Early preview. |
| etcd | Key-value API over gRPC | One Raft quorum for the cluster. Key-value operations are linearizable by default. API guarantees | Free · Apache-2.0. |
| Hazelcast | IMap |
Configurable synchronous and asynchronous partition backups. The separate CP Subsystem uses Raft. Map backups | Free Community Edition. The CP Subsystem in Hazelcast 5.7 requires paid Enterprise. |
| NCache | NCache .NET client | In Partition-Replica, synchronous writes wait for the partition's backup. Asynchronous writes replicate in the background. Partition-Replica | Free Open Source edition. Paid commercial edition. Topology availability varies by edition. Edition comparison |
| Garnet | RESP | Asynchronous log replication. Forced promotion can expose a replica that lacks acknowledged writes. Failover | Free · MIT. |
| Redis / Valkey | RESP | Asynchronous by default. WAIT can wait for replica acknowledgments.
Redis replication ·
Valkey replication |
Redis · Free option under AGPLv3, RSALv2 or SSPLv1 in Redis 8.
Commercial editions available. Licenses by version Valkey · Free under BSD-3-Clause. |
Try It With Your Application
Start with one server and two processes. Check serialization, expiration, cache misses, and how your application handles an unavailable cache server. Measure performance and capacity with your own workload.