public ArtistReleases GetArtistReleases(int artistId, PaginationRequest paginationRequest = null) { Tuple<int, PaginationRequest> key = new Tuple<int, PaginationRequest>(artistId, paginationRequest); if (artistReleasesCache.ContainsKey(key)) { return artistReleasesCache[key]; } return artistReleasesCache[key] = this.discogs.GetArtistReleases(artistId, paginationRequest); }
public override bool Equals(object obj) { PaginationRequest other = obj as PaginationRequest; if (other == null) { return(false); } return (this.Page == other.Page && this.PerPage == other.PerPage); }
public SearchResults Search(SearchQuery query, PaginationRequest paginationRequest = null) { Tuple<SearchQuery, PaginationRequest> key = new Tuple<SearchQuery, PaginationRequest>(query, paginationRequest); if (searchCache.ContainsKey(key)) { return searchCache[key]; } return searchCache[key] = this.discogs.Search(query, paginationRequest); }