Update LFU when an object is accessed. * Firstly, decrement the counter if the decrement time is reached. * Then logarithmically increment the counter, and update the access time. */
| 70 | * Firstly, decrement the counter if the decrement time is reached. |
| 71 | * Then logarithmically increment the counter, and update the access time. */ |
| 72 | void updateLFU(robj *val) { |
| 73 | unsigned long counter = LFUDecrAndReturn(val); |
| 74 | counter = LFULogIncr(counter); |
| 75 | val->lru = (LFUGetTimeInMinutes()<<8) | counter; |
| 76 | } |
| 77 | |
| 78 | void updateExpire(redisDb *db, sds key, robj *valOld, robj *valNew) |
| 79 | { |
no test coverage detected