• Dag Erling Smørgrav's avatar
    First step in implementing early retirement of objects when the cache fills · 76646960
    Dag Erling Smørgrav authored
    up: implement a "sloppy" LRU list.  An object is placed on the list (or moved
    to the head of the list if it's already on it and hasn't moved recently) by
    calling LRU_Enter(), and removed by calling LRU_Remove().  LRU_DiscardSpace()
    will iterate through the LRU list, starting at the back, and retire objects
    (by adding them to the deathrow list) until the sum of the length of the
    retired objects reaches a certain number.  Similarly, LRU_DiscardTime() will
    retire objects which haven't moved since a specified cutoff date.  In both
    cases, vcl_discard() will be given a chance to inspect the object and veto
    its retirement.
    
    Currently, LRU_Enter() and LRU_Remove() are called from HSH_Lookup() and
    HSH_Deref() respectively.  There may be better alternatives.
    
    Neither LRU_DiscardSpace() nor LRU_DiscardTime() is currently called from
    anywhere.  There are a number of issues to consider: for instance, even if
    LRU_DiscardSpace() is called when a high-water mark is reached, there is
    still a possibility that the cache might fill up before it has had a chance
    to finish and the hangman has had a chance to process the deathrow list.
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1570 d4fa192b-c00b-0410-8231-f00ffab90ce4
    76646960
Name
Last commit
Last update
bin Loading commit data...
debian Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
man Loading commit data...
redhat Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...