public void should_be_able_to_update_key() { _cachedString.Set("Key", "Old"); _cachedString.Set("Key", "New"); _cachedString.Find("Key").Should().Be("New"); }
public bool Allowed(IEnumerable <string> fingerPrint) { var key = string.Join("|", fingerPrint); var exists = _cache.Find(key); if (exists) { return(false); } _cache.Set(key, true, _ttl); return(true); }