Example #1
0
        public void MaintainCache()
        {
            var worldId = Core.Player.WorldSnoId;

            Cache.RemoveAll(p => p.WorldId != worldId);

            while (RecentPositions.Count > RecentPositionsLimit)
            {
                RecentPositions.RemoveAt(0);
            }

            while (Cache.Count > CacheLimit)
            {
                Cache.RemoveAt(0);
            }
        }