mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
Use getLRUClock() instead of server.lruclock to create objects.
Thanks to Matt Stancliff for noticing this error. It was in the original code but somehow I managed to remove the change from the commit...
This commit is contained in:
parent
5fa3248bad
commit
4d2e8fa189
@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) {
|
||||
o->refcount = 1;
|
||||
|
||||
/* Set the LRU to the current lruclock (minutes resolution). */
|
||||
o->lru = server.lruclock;
|
||||
o->lru = getLRUClock();
|
||||
return o;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) {
|
||||
o->encoding = REDIS_ENCODING_EMBSTR;
|
||||
o->ptr = sh+1;
|
||||
o->refcount = 1;
|
||||
o->lru = server.lruclock;
|
||||
o->lru = getLRUClock();
|
||||
|
||||
sh->len = len;
|
||||
sh->free = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user