public static AccountsSnapshot GetAccountsSnapshot()
        {
            var accountsSnapshotLoclCacheKey = "accountsSnapshotcachekey";

            var accountsSnapshot = new AccountsSnapshot();

            if (System.Web.HttpRuntime.Cache.Get(accountsSnapshotLoclCacheKey) == null)
            {
                //if local cache is empty

                var platformManagementServiceClient = new PlatformManagementService.PlatformManagementServiceClient();

                try
                {
                    platformManagementServiceClient.Open();

                    accountsSnapshot = platformManagementServiceClient.GetAccountsShapshot(Common.SharedClientKey);

                    //Close the connection
                    WCFManager.CloseConnection(platformManagementServiceClient);

                    //Store snapshot in local cache for 5 seconds (for charting components to use):
                    System.Web.HttpRuntime.Cache.Insert(accountsSnapshotLoclCacheKey, accountsSnapshot, null, DateTime.Now.AddSeconds(5), Cache.NoSlidingExpiration, CacheItemPriority.Default, null);
                }
                catch (Exception e)
                {
                    #region Manage Exception

                    string exceptionMessage = e.Message.ToString();

                    var    currentMethod       = System.Reflection.MethodBase.GetCurrentMethod();
                    string currentMethodString = currentMethod.DeclaringType.FullName + "." + currentMethod.Name;

                    // Abort the connection & manage the exception
                    WCFManager.CloseConnection(platformManagementServiceClient, exceptionMessage, currentMethodString);

                    #endregion
                }
            }
            else
            {
                // Get snapshot from cache
                accountsSnapshot = (AccountsSnapshot)System.Web.HttpRuntime.Cache.Get(accountsSnapshotLoclCacheKey);
            }


            return(accountsSnapshot);
        }