// Retuns an item from the cache corresponding to the GUID key passed to the method public static Invoices GetItem(string guid) { // Cleans cache cache.RemoveOld(cacheDuration); cache.RemoveOldest(maxCacheSize); if (cache.ContainsKey(guid)) { return(cache[guid]); } else { return(new Item()); } }