public static string GetCachedKey(string pattern, IWorkContext workContext) { if (!workContext.IsAuthenticated()) { throw new iPemException("Unauthorized"); } return(string.Format(pattern, workContext.Identifier())); }