| 89 | } |
| 90 | |
| 91 | static void lookupKeyUpdateObj(robj *val, int flags) |
| 92 | { |
| 93 | /* Update the access time for the ageing algorithm. |
| 94 | * Don't do it if we have a saving child, as this will trigger |
| 95 | * a copy on write madness. */ |
| 96 | if (!hasActiveChildProcessOrBGSave() && !(flags & LOOKUP_NOTOUCH)) |
| 97 | { |
| 98 | if (g_pserver->maxmemory_policy & MAXMEMORY_FLAG_LFU) { |
| 99 | updateLFU(val); |
| 100 | } else { |
| 101 | val->lru = LRU_CLOCK(); |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /* Low level key lookup API, not actually called directly from commands |
| 107 | * implementations that should instead rely on lookupKeyRead(), |
no test coverage detected