I've been trying to write a simple little Cmdlet to allow me to Set/Get/Remove cache items. The problem I have is that I cannot figure out how to connect to the local cache cluster.
I've tried adding in the usual app.config stuff, but that doesn't seem to get picked up ...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<dataCacheClient>
<hosts>
<host name="localhost" cachePort="22233" />
</hosts>
</dataCacheClient>
</configuration>
I'd rather not have that config at all. So what I am really asking is what the equivalent C# code is for the following powershell...
Use-CacheCluster
From what I can gather Use-CacheCluster
connect to the local cluster if no parameters are supplied