Now insert the following code in 'Main' of the project.
Cache _cache = NCache.initializeCache( "myCache" );
_cache.clear();
Customer customer = new Customer();
customer.name = "David" ;
customer.customerID = 1001 ;
customer.setCity( " London " );
customer.setContactNumber( "+44-xxx-xxxx-xxxx" );
customer.setOrderInProcess( true );
_cache.add("Customer:David:1001", customer, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.High);
Object object_Customer = _cache.get("Customer:David:1001");
Customer customerInformation = (Customer) object_Customer;
System.out.println( "Customer ID: " + customerInformation.customerID);
System.out.println( "Name: " + customerInformation.name);
System.out.println( "City: " + customerInformation.getCity());
System.out.println( "Contact Number: " + customerInformation.getContactNumber());
System.out.println( "Order placed: " + customerInformation.isOrderInProcess());