Added menu caching when WP_DEBUG is false