public static void AddAuthor(Author author) { Dictionary<long, string> fromCache = cachedAuthors; if (fromCache.ContainsKey(author.ID)) return; fromCache.Add(author.ID, author.ToString()); }
public static void UpdateAuthor(Author author) { Dictionary<long, string> fromCache = cachedAuthors; if (fromCache.ContainsKey(author.ID)) fromCache[author.ID] = author.ToString(); else fromCache.Add(author.ID, author.ToString()); }