Clear memorycache on connection's state change