public void Put(UrlRequest request, Response response) { var cacheItem = new MongoCacheItem(request.CacheKey, request.Url, response); _collection.Insert(cacheItem, SafeMode.False); }
public Response Get(UrlRequest request) { var cacheItem = _collection.FindOneById(request.CacheKey); return cacheItem == null ? null : cacheItem.Response; }