Commit graph

2 commits

Author SHA1 Message Date
Miek Gieben
b44d82839f middleware/cache: rename categories (#321)
Rename: positive -> success
negative -> denial

There is a third (unused category) which is error. Start using these
new in the caching middleware and later in the logging middleware.
2016-10-08 15:12:28 +01:00
Miek Gieben
e54c232c8c middleware/cache: split cache in positive and negative and use lru (#298)
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
2016-10-02 08:31:44 +01:00