def METHOD_NAME(
    key: str, value: DocRenderResult, ex: int = DEFAULT_EXPIRE_SECS
) -> None:
    rclient.delete(key)
    rclient.rpush(
        key,
        value.head_html,
        value.content_html,
        # Redis doesn't accept None value, so convert it to empty string.
        value.override_theme or "",
        int(value.hide_readmarks),
    )
    refresh_doc_expire(key, ex)