Skip to content

About

Using Apache Ignite as distributed cache infrastructure in .net Core

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

IgniteCachingDistributed

Using Apache Ignite as distributed cache infrastructure in .net Core

https://www.nuget.org/packages/Raveshmand.Cache.Ignite/

Simple configuration

services.AddDistributedIgniteCache(option =>
{
    option.Endpoints = new string[]
        {
            "localhost:11211",
            "localhost:47100",
            "localhost:47500",
            "localhost:49112"
        };
    option.PersistenceEnabled = true;
});

Advanced Configuration

for advance configuration, see https://apacheignite-net.readme.io/docs/

IgniteConfiguration customConfiguration = new IgniteConfiguration
  {
      DiscoverySpi = new TcpDiscoverySpi
      {
          IpFinder = new TcpDiscoveryStaticIpFinder
          {
              Endpoints = new string[]
              {
                  "localhost:11211",
                  "localhost:47100",
                  "localhost:47500",
                  "localhost:49112"
              }
          },
          SocketTimeout = TimeSpan.FromSeconds(0.3)
      },
      IncludedEventTypes = EventType.CacheAll,
      DataStorageConfiguration = new DataStorageConfiguration
      {
          DefaultDataRegionConfiguration = new DataRegionConfiguration
          {
              Name = "defaultRegion",
              PersistenceEnabled = true
          },
          DataRegionConfigurations = new[]
          {
                  new DataRegionConfiguration
                  {
                      // Persistence is off by default.
                      Name = "inMemoryRegion"
                  }
              }
      },
      CacheConfiguration = new[]
      {
          new CacheConfiguration
          {
              // Default data region has persistence enabled.
              Name = "persistentCache"
          },
          new CacheConfiguration
          {
              Name = "inMemoryOnlyCache",
              DataRegionName = "inMemoryRegion"
          }
      }
  };
  services.AddDistributedIgniteCache(option => 
  { 
      option.Configuration = customConfiguration;
      option.SetActive = true;
  });

About

Using Apache Ignite as distributed cache infrastructure in .net Core

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages