lots of debugging on the cache system. Seems to work when sockets do not read too much data at once. More testing is needed.