Beispiel #1
0
        public void AddToIndex(string address)
        {
            if (string.IsNullOrEmpty(address))
            {
                return;
            }

            var ownerIndex = new OwnerIndexItem()
            {
                Address = address
            };

            database.SaveOwnerIndex(ownerIndex);
            IndexOwnerCache.AddOrUpdate(ownerIndex);
        }
Beispiel #2
0
        public OwnerIndexItem Get()
        {
            var cachedIndex = IndexOwnerCache.Get();

            if (cachedIndex != null)
            {
                return(cachedIndex);
            }

            var index = database.GetOwnerIndex();

            if (index != null)
            {
                IndexOwnerCache.AddOrUpdate(index);
            }
            return(index);
        }