Specify LRU resolution in milliseconds.

This commit is contained in:
antirez
2014-03-20 11:33:25 +01:00
parent 63aacbe86c
commit 8f0b74910a
4 changed files with 4 additions and 5 deletions

View File

@ -650,7 +650,7 @@ char *strEncoding(int encoding) {
/* Given an object returns the min number of seconds the object was never
* requested, using an approximated LRU algorithm. */
unsigned long estimateObjectIdleTime(robj *o) {
unsigned long long estimateObjectIdleTime(robj *o) {
if (server.lruclock >= o->lru) {
return (server.lruclock - o->lru) * REDIS_LRU_CLOCK_RESOLUTION;
} else {