Skip to content

ChronologicalEvictionStrategy Methods

Eviction strategy that evicts data based off of age.

PerformPurge(DateTime)

View source
public void PerformPurge(DateTime nowUtc)
Method which should be called when pulling agent try to do a purge on the cache

Parameters

nowUtcDateTime
The current time (UTC)

ShouldPurge(CachedMessage, CachedMessage, DateTime)

virtual
View source
protected virtual bool ShouldPurge(ref CachedMessage cachedMessage, ref CachedMessage newestCachedMessage, DateTime nowUtc)
Given a cached message, indicates whether it should be purged from the cache.

Parameters

cachedMessageCachedMessage
The cached message.
newestCachedMessageCachedMessage
The newest cached message.
nowUtcDateTime
The current time (UTC).

Returns

true if the message should be purged, false otherwise.