示例#1
0
        public void should_be_able_to_update_key()
        {
            _cachedString.Set("Key", "Old");
            _cachedString.Set("Key", "New");

            _cachedString.Find("Key").Should().Be("New");
        }
示例#2
0
        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);
        }