As a result, they get cleaned up by the cleanup job when it runs every 2 hours, since it thinks the peer is older than 31 minutes - Which it isn't - it's just that the recent announce didn't update in redis.
This is probably why the cache hits drop every 2 hours - since we delete peers who are active, and on a subsequent announce thinking we need to invalidate the cache for a "new seeder"
Fix: Even if there is no change to the cache, we need to call ZADD to update the seeder's timestamp.
Currently, if an announce can be served from cache (no "change"), we do so.
In the case of long term seeders, there is no change to
seed_count
orleech_count
, so we don'tZADD
them to the seeders: https://github.com/ckcr4lyf/kiryuu/blob/92611e8069c7205958cc475d9cf4478409db4e27/src/main.rs#L106-L125As a result, they get cleaned up by the cleanup job when it runs every 2 hours, since it thinks the peer is older than 31 minutes - Which it isn't - it's just that the recent announce didn't update in redis.
This is probably why the cache hits drop every 2 hours - since we delete peers who are active, and on a subsequent announce thinking we need to invalidate the cache for a "new seeder"
Fix: Even if there is no change to the cache, we need to call ZADD to update the seeder's timestamp.