Adding constructor. Also, m_cached is protected, not private.