ASP.NET Output Caching
Improve web farm performance with an in-memory distributed output cache
Ignite cache can be used as ASP.NET output cache. This can work especially well for web farms where cached output will be shared between web servers.
Installation
Binary distribution: add a reference to Apache.Ignite.AspNet.dll
NuGet: Install-Package Apache.Ignite.AspNet
Configuration: starting Ignite automatically
To start Ignite automatically for output caching, configure it in web.config via IgniteConfigurationSection (see Configuration):
<configuration>
<configSections>
<section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
</configSections>
<igniteConfiguration autoGenerateIgniteInstanceName="true">
<cacheConfiguration>
<cacheConfiguration name='myWebCache' />
</cacheConfiguration>
</igniteConfiguration>
</configuration>
Configure caching in web.config
<system.web>
<caching>
<outputCache defaultProvider="apacheIgnite">
<providers>
<add name="apacheIgnite" type="Apache.Ignite.AspNet.IgniteOutputCacheProvider, Apache.Ignite.AspNet" igniteConfigurationSectionName="igniteConfiguration" cacheName="myWebCache" />
</providers>
</outputCache>
</caching>
</system.web>
Configuration: starting Ignite manually
You can start Ignite instance manually and specify it's name in the provider configuration:
<system.web>
<caching>
<outputCache defaultProvider="apacheIgnite">
<providers>
<add name="apacheIgnite" type="Apache.Ignite.AspNet.IgniteOutputCacheProvider, Apache.Ignite.AspNet" cacheName="myWebCache" />
</providers>
</outputCache>
</caching>
</system.web>
Ignite instance should be started before any request is served. Typically this is done in Application_Start method in global.asax.
See ASP.NET Deployment for web deployment specifics related to IGNITE_HOME.
Updated almost 6 years ago
