The ringbuffer implementation currently in use can potentially be slow. The memcache code from source3 seems like a better fit
On my list.