Skip to content

Latest commit

 

History

History
87 lines (60 loc) · 2.54 KB

README.md

File metadata and controls

87 lines (60 loc) · 2.54 KB

XPike.Caching

Build Status Nuget

Provides caching support for xPike.

Overview

xPike Caching is the recommended approach for caching object data in xPike.

  • Only supports simple Get/Set of a serialized object by cache key right now.
  • Supports multiple named connections, each with a different configuration.
  • Supports caching in local memory through the InMemoryCacheProvider.
  • Supports N-tier cache configurations through the HybridCacheProvider.
  • Supports distributed invalidation of local caches through a pub/sub mechanism.
  • Supports an Extended TTL concept to distinguish "stale" from "expired" data.
    • Allows stale data to be used during a transient outage of a datasource.

Exported Services

Singletons

  • ICachingService
    => CachingService

  • ICacheInvalidationService
    => NullCacheInvalidationService

  • IInMemoryCachingConnectionProvider
    => InMemoryCachingConnectionProvider

  • IHybridCachingConnectionProvider
    => HybridCachingConnectionProvider

Usage

In ASP.NET Core:

public void ConfigureServices(IServiceCollection services)
{
    services.AddXPikeDependencyInjection()
            .AddXPikeCaching();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    app.UseXPikeDependencyInjection()
       .UseXPikeCacheProvider<IHybridCachingConnectionProvider>(null)
       .AddXPikeHybridCacheProvider<IInMemoryCachingConnectionProvider>(null);
}

Dependencies

  • XPike.Logging
  • XPike.Configuration
  • XPike.IoC

Building and Testing

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

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:

  1. A detailed description of the problem
  2. Steps to reproduce
  3. Expected results
  4. Actual results
  5. Version of the package xPike
  6. Version of the .Net runtime

Contributing

See our contributing guidelines in our documentation for information on how to contribute to xPike.

License

xPike is licensed under the MIT License.