Set the key last access time for LRU based eviction. not relevant if the * servers's maxmemory policy is LFU based. Value is idle time in milliseconds. * returns REDISMODULE_OK if the LRU was updated, REDISMODULE_ERR otherwise. */
| 9028 | * servers's maxmemory policy is LFU based. Value is idle time in milliseconds. |
| 9029 | * returns REDISMODULE_OK if the LRU was updated, REDISMODULE_ERR otherwise. */ |
| 9030 | int RM_SetLRU(RedisModuleKey *key, mstime_t lru_idle) { |
| 9031 | if (!key->value) |
| 9032 | return REDISMODULE_ERR; |
| 9033 | if (objectSetLRUOrLFU(key->value, -1, lru_idle, lru_idle>=0 ? LRU_CLOCK() : 0, 1)) |
| 9034 | return REDISMODULE_OK; |
| 9035 | return REDISMODULE_ERR; |
| 9036 | } |
| 9037 | |
| 9038 | /* Gets the key last access time. |
| 9039 | * Value is idletime in milliseconds or -1 if the server's eviction policy is |
nothing calls this directly
no test coverage detected