• antirez's avatar
    Obtain LRU clock in a resolution dependent way. · ad6b0f70
    antirez authored
    For testing purposes it is handy to have a very high resolution of the
    LRU clock, so that it is possible to experiment with scripts running in
    just a few seconds how the eviction algorithms works.
    
    This commit allows Redis to use the cached LRU clock, or a value
    computed on demand, depending on the resolution. So normally we have the
    good performance of a precomputed value, and a clock that wraps in many
    days using the normal resolution, but if needed, changing a define will
    switch behavior to an high resolution LRU clock.
    ad6b0f70
object.c 21.7 KB