From: Zoran V. <zv...@ar...> - 2006-06-14 13:37:11
|
Am 14.06.2006 um 12:12 schrieb Zoran Vasiljevic: > One solution would be to really delete expired entry in > Ns_CacheFindEntry() > instead of just ExpireEntry(). This would salvage logic in > Ns_CacheWaitCreateEntry(). > > Another solution would be to add new bit in the Entry structure > marking > the structure as expired. Then add new logic in the > Ns_CacheWaitCreateEntry() > which would check that bit and act accordingly. Third solution is NOT to ExpireEntry from within the Ns_CacheFindEntry. Instead, just record the event (update counters) and return NULL. This will have a side effect that such entries cannot be directly flushed (i.e. deleted) until they are either set to a new value OR until the entire cache is purged. I have checked-in this change and am satisfied with it, as it solves my problem. We could invest some more time and perhaps find more optimal or elegant solution but I will leave this to Stephen. Cheers, Zoran |