When to Use Squirix

Share typed cache entries between .NET applications, including separate ASP.NET Core instances.

A Shared Cache Across Processes

Squirix lets separate .NET processes read and update the same cached values. You run the cache server, and your applications connect to it through the Squirix SDK over HTTPS gRPC. Entries live on the server. In your application, you work with a typed ICache<T>.

Two ASP.NET Core instances can read one cached product description rather than each keeping its own copy. A background worker can write a value for a web application to read later.

Run the two-process console example or try the ASP.NET Core example. The ASP.NET Core guide is in the develop documentation; its example uses the published preview.10 SDK.

Cache Application Data With Expiration

For cache-aside, look up a typed value with GetValueAsync. If it is missing, load it from the source and store it with SetAsync. You can give the entry a relative lifetime or an absolute expiration time.

You decide how long to cache a value and when to remove or replace it after the source changes. Expiration alone does not keep the cache in sync with your database.

GetOrAddAsync accepts a factory to populate a missing entry. That factory may run concurrently in more than one application instance, so it must be safe to call that way.

Read the Client API guide.

Persistence and Replication

The quickstart runs one server with in-memory storage. To test recovery after a server restart, enable journal and snapshot persistence. Choose replication separately.

A single-replica deployment has no automatic failover. You can enable it in a replicated deployment with at least three replicas. If a replica group loses its majority, it refuses writes. Your application needs to handle those cache operations being unavailable.

Review configuration options and read the preview.10 consistency guarantees before choosing a topology.

Requirements and Limits

  • Version 0.1.0-preview.10 is an early preview and is not production-ready. Try it with development workloads before planning adoption.
  • The SDK targets .NET 10. The examples use Squirix's ICache<T> API. If your application already uses IDistributedCache, you will need to integrate Squirix separately.
  • If only one process needs the cached values, a local cache saves you a separate server and network requests.
  • This preview does not guarantee atomic updates across owners or multi-key transactions. Keep authoritative data in a system that meets your transaction and recovery requirements.
  • Routing is static. Squirix v0.1 does not support automatic rebalancing or membership-driven routing.

Try It With Your Application

Start with one server and two processes. Check that your value types serialize correctly and entries expire when you expect. Test what your application does on a cache miss and when the server is unavailable. Measure your own workload before deciding on performance or capacity.