Now insert the following code in the 'Main' of the project:
Cache _cache = NCache.InitializeCache("mycache");
_cache.Clear();
Customer customer = new Customer ();
customer.name = "David" ;
customer.customerID = 1001;
customer.City = "London" ;
customer.ContactNumber = "+44-xxx-xxxx-xxxx" ;
customer.IsOrderInProcess = true ;
_cache.Add( "Customer:David:1001" , customer, null , Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.High);
Object objectCustomer = _cache.Get("Customer:David:1001");
Customer customerInformation = (Customer)objectCustomer;
Console.WriteLine("Customer ID: " + customerInformation.customerID);
Console.WriteLine("Name: " + customerInformation.name);
Console.WriteLine("City: " + customerInformation.City);
Console.WriteLine("Contact Number: " + customerInformation.ContactNumber);
Console.WriteLine("Order placed: " + customerInformation.IsOrderInProcess);