• Poul-Henning Kamp's avatar
    Counter-intuitively change the LRU list from a VTAILQ to a VLIST. · 99b35c5f
    Poul-Henning Kamp authored
    The cruical difference is that we can remove from a VLIST without
    having the head of the VLIST, which comes handy when expiring a
    non-instantiated object from a -spersistent stevedore.
    
    We flip the LRU list around, so that the frontmost element has not
    been accessed for the longest time, and simulate tail-inserts by
    putting a senteniel on the tail of the list.
    
    Presently the senteniel is a full objcore, which is a non-issue with
    few machines having more than a handful of stevedores, but once the
    persistent stevedore moves to per-segment LRU lists, this needs to
    be addressed, probably by wrapping the LRU linkage in a separate
    structure.
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4211 d4fa192b-c00b-0410-8231-f00ffab90ce4
    99b35c5f
cache.h 18.5 KB