add cache debugging

adds DEBUG=cache for some cache debugging stuff