public void Remove(IEnumerable <string> keys) { foreach (var key in keys) { _localCache.Remove(key); } }
public ReviewViewModel Add(ReviewSubmissionViewModel review) { // Instantiate a reference for the product var product = Reference.Create($"product://{review.ProductCode}"); // Instantiate a reference for the contributor var contributor = Reference.Create($"visitor://{review.Nickname}"); // Add the contributor's rating for the product var submittedRating = new Rating(contributor, product, new RatingValue(review.Rating)); var storedRating = _ratingService.Add(submittedRating); // Compose a comment representing the review var comment = new Comment(product, contributor, review.Body, true); var extension = new Review { Title = review.Title, Location = review.Location, Nickname = review.Nickname, Rating = new ReviewRating { Value = review.Rating, Reference = storedRating.Id.Id } }; var result = _commentService.Add(comment, extension); _cache.Remove(CachePrefix + review.ProductCode); // Add the composite comment for the product return(ViewModelAdapter.Adapt(result)); }
public void ResetState() { lock (this) { _virtualTemplatesCache.Reset(); _cache.Remove(_registeredViewsCacheKey); } }
private void ClearFacetNamesCache() { _objectInstanceCache.Remove(GetCacheName()); }
public void Remove(string key) => _defaultCache.Remove(key);
public void Remove(string key) { var internalKey = _cacheKeyPrefix + key; _cacheManager.Remove(internalKey); }
private void InvalidatePromotionCache(int id) { _cache.Remove(GetPromotionCacheKey(id)); }