• Miek Gieben's avatar
    middleware/cache: split cache in positive and negative and use lru (#298) · e54c232c
    Miek Gieben authored
    Make the cache memory bounded, by using a LRU cache. Also split the
    cache in a positive and negative one - each with its own controls.
    
    Extend the cache stanza to allow for this:
    
        cache {
           positive limit [ttl]
           negative limit [ttl]
        }
    
    is now possible. This also add a cache_test.go in the toplevel test/
    directory that exercises the caching path.
    
    Fixes #260
    e54c232c
cache_test.go 2.01 KB