Object approximated LRU algorithm enhanced / fixed / refactored. This is used for the VM currently but will soon be used for maxmemory expiring.

This commit is contained in:
antirez
2010-10-14 13:52:58 +02:00
parent b4f2e412d0
commit ef59a8bc9e
6 changed files with 41 additions and 23 deletions

View File

@ -213,9 +213,11 @@ void debugCommand(redisClient *c) {
strenc = strEncoding(val->encoding);
addReplyStatusFormat(c,
"Value at:%p refcount:%d "
"encoding:%s serializedlength:%lld",
"encoding:%s serializedlength:%lld "
"lru :%d lru_seconds_idle:%lu",
(void*)val, val->refcount,
strenc, (long long) rdbSavedObjectLen(val,NULL));
strenc, (long long) rdbSavedObjectLen(val,NULL),
val->lru, estimateObjectIdleTime(val));
} else {
vmpointer *vp = (vmpointer*) val;
addReplyStatusFormat(c,