mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-23 09:15:02 +01:00
feat(pool): introduce tombstone-based deletion with soft-delete mechanism
Refactored the pool implementation to use a tombstone-based deletion strategy instead of immediate removal. This allows correct logging "reload" instead of "removed" + "added" when an item is quickly deleted and re-added within a short time window. Changes: - Items are now marked as tombstones upon deletion and retained for 1 second - Added `PurgeExpiredTombs()` method for cleanup of expired tombstones - Updated `Get`, `Iter`, and `Slice` to skip tombstoned entries - Updated `Del` and `DelKey` to cleanup tombstones when exceeding threshold - `AddIfNotExists` can now "reload" recently deleted items within the TTL - Added tomb counter for tracking active tombstones and triggering purge
This commit is contained in: