David Kennedy’s Tech Ramblings

Just another WordPress.com weblog

Windows AppFabric Beta 2 Cache Configuration March 3, 2010

Filed under: AppFabric,Cache,Dublin,Velocity — dotnetdave @ 1:57 am

Being only two days old there is little information out there at the time of this writing. By starting with Beta 1 configuration samples and working with Reflector to inspect the Microsoft.ApplicationServer.Caching.Core and Microsoft.ApplicationServer.Caching.Client assemblies I was able to make the necessary changes so that the configuration xml lines up with the associated configuration class. I ended up with the following.

<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"/>

 

<dataCacheClient>
    <hosts>
      <host
      name="localhost"
      cachePort="22233"/>
    </hosts>
  </dataCacheClient>

 

This minimalist configuration was enough to get me started with simple ‘Add’ and ‘Get’ operations against the cache.

var factory = new DataCacheFactory();
cache = factory.GetCache("default");

Advertisements
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s