You are on page 1of 25

Introduction and Architecture

WORKFLOW
MONITORING
HOSTING
CACHING
Remember – PowerShell can also be called from .NET
Code!
//create DataCacheFactory based on config file
var dcf = new DataCacheFactory();
//get the cache named "TestCache"
var cache = dcf.GetCache("TestCache");
//Add an item called "Test" - throws if exists
cache.Add("Test", new Data { TheData = "Test" });
//Put an item called "Test2" - overwrites if exists
cache.Add("Test2", new Data {TheData = "Test2" });
//Get "Test3" - add if not in cache (cache-aside)
var test3 = cache.Get("Test3") as Data;
if (test3 == null)
{
test3 = new Data {TheData = "Test3" };
cache.Add("Test3", test3);
}
grant-cacheallowedclientaccount  MyDomain\Machine1$
grant-cacheallowedclientaccount  MyDomain\Jon
<sessionState mode="Custom" customProvider="SessionStoreProvider">
<providers>
<add name="SessionStoreProvider"
type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider,
Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
cacheName="BlueYonderSession"/>
</providers>
</sessionState>

You might also like