add caching pipelining (fixes #9)