Provides basic Redis support for xPike.
xPike Redis is the recommended caching provider for xPike.
It uses StackExchange.Redis, the leading .NET connection library for Redis.
Multiple connections to different Redis servers/clusters is supported.
The library is fully thread-safe and friendly with all dependency injection scenarios.
Supports caching (IDatabase), publishing and subscribing to topics (ISubscriber), and direct access to the underlying IConnectionMultiplexer.
Connections are defined and managed via application settings.
The current implementation serializes objects in JSON as a Redis String.
IRedisConnectionProvider
=>RedisConnectionProvider
In ASP.NET Core:
public void ConfigureServices(IServiceCollection services)
{
services.UseXPikeDependencyInjection()
.AddXPikeRedis();
}
appspettings.json
:
{
"XPike": {
"Redis": {
"Connections": {
"default": {
"ConnectionString": "localhost:6379",
"Enabled": "true"
},
"myOtherCache": {
"ConnectionString": "contoso5.redis.cache.windows.net,ssl=true,password=..."
"Enabled": "true"
}
}
}
}
}
XPike.Logging
XPike.Configuration
XPike.IoC
Building from source and running unit tests requires a Windows machine with:
- .Net Core 3.0 SDK
- .Net Framework 4.6.1 Developer Pack
Issues are tracked on GitHub. Anyone is welcome to file a bug, an enhancement request, or ask a general question. We ask that bug reports include:
- A detailed description of the problem
- Steps to reproduce
- Expected results
- Actual results
- Version of the package xPike
- Version of the .Net runtime
See our contributing guidelines in our documentation for information on how to contribute to xPike.
xPike is licensed under the MIT License.