Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
63aacbe8
You need to sign in or sign up before continuing.
Commit
63aacbe8
authored
Mar 20, 2014
by
antirez
Browse files
Set LRU parameters via REDIS_LRU_BITS define.
parent
8b6a674a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.h
View file @
63aacbe8
...
...
@@ -382,13 +382,14 @@ typedef long long mstime_t; /* millisecond time type. */
/* A redis object, that is a type able to hold a string / list / set */
/* The actual Redis Object */
#define REDIS_LRU_CLOCK_MAX ((1<<22)-1)
/* Max value of obj->lru */
#define REDIS_LRU_BITS 22
#define REDIS_LRU_CLOCK_MAX ((1<<REDIS_LRU_BITS)-1)
/* Max value of obj->lru */
#define REDIS_LRU_CLOCK_RESOLUTION 10
/* LRU clock resolution in seconds */
typedef
struct
redisObject
{
unsigned
type
:
4
;
unsigned
notused
:
2
;
/* Not used */
unsigned
encoding
:
4
;
unsigned
lru
:
22
;
/* lru time (relative to server.lruclock) */
unsigned
lru
:
REDIS_LRU_BITS
;
/* lru time (relative to server.lruclock) */
int
refcount
;
void
*
ptr
;
}
robj
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment