1: //Define Array for 1 Cache Host
   2: List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(1);
   3:  
   4: //Specify Cache Host Details 
   5: //  Parameter 1 = host name
   6: //  Parameter 2 = cache port number
   7: servers.Add(new DataCacheServerEndpoint("localhost", 22233));
   8:  
   9: //Create cache configuration
  10: DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
  11:  
  12: //Set the cache host(s)
  13: configuration.Servers = servers;
  14:  
  15: //Set default properties for local cache (local cache disabled)
  16: configuration.LocalCacheProperties = new DataCacheLocalCacheProperties();
  17:  
  18: //Disable exception messages since this sample works on a cache aside
  19: DataCacheClientLogManager.ChangeLogLevel(System.Diagnostics.TraceLevel.Off);
  20:  
  21: //Pass configuration settings to cacheFactory constructor
  22: myCacheFactory = new DataCacheFactory(configuration);
  23:  
  24: //Get reference to named cache called "default"
  25: myDefaultCache = myCacheFactory.GetCache("default");