I use one cache to store some Points's snap value which are reads from PIServer.
the cache is:
Dictionary<string, AFValue> cache = new Dictionary<string, AFValue>();
add points to cache:
List<PIPoint> plst = PIPoint.FindPIPoints(this.server, TargetTag).ToList();
foreach (var point in plst)
{
AFValue tmp = new AFValue(new AFAttribute(point), new object(), new AFTime());
this.cache.Add($"{point.Name}", tmp);
}
update:
this.cache[rec.Item1].Value = rec.Item3;
this.cache[rec.Item1].Timestamp = new AFTime(rec.Item2.ToLocalTime());
newValues.Add(this.cache[rec.Item1]);
newValues is a list and will be cleaned after UpdateValuesAsync().
Update the point's value one second and after several hours(may be 72 hours), the memory of my application grows from 60MB to 500MB.
So i want to know if the cache point's store something when i update its value and time ?