REGR: properly update DataFrame cache in Series.__setitem__
Potential fix for https://github.com/pandas-dev/pandas/issues/47172


https://github.com/pandas-dev/pandas/pull/43406 added an `inplace` keyword to `_maybe_update_cacher`, but made the default `False`. While before that PR, the effective behaviour would rather match `True` I think (that PR was meant to make some cases _not_ inplace). 
However, if we are in the case of `Series.__setitem__` needing a cache update, so meaning that this series is a column of a DataFrame and we might need to update that DataFrame, I think we always should try update that DataFrame inplace (we are not in a `DataFrame.__setitem__` case, but rather setting into a column we got with `DataFrame.__getitem__`, so chained assignment, which currently still is expected to work in this case).
I am not fully sure how to exactly test https://github.com/pandas-dev/pandas/issues/47172 (but I verified manually that it fixes the memory increase), but I did add a test that fails on main and 1.4 (and worked on pandas 1.3) and passes with this fix. > Potential fix for #47172
> 
> #43406 added an `inplace` keyword to `_maybe_update_cacher`, but made the default `False`. While before that PR, the effective behaviour would rather match `True` I think (that PR was meant to make some cases _not_ inplace). However, if we are in the case of `Series.__setitem__` needing a cache update, so meaning that this series is a column of a DataFrame and we might need to update that DataFrame, I think we always should try update that DataFrame inplace (we are not in a `DataFrame.__setitem__` case, but rather setting into a column we got with `DataFrame.__getitem__`, so chained assignment, which currently still is expected to work in this case).

Thanks for the explanation. makes sense.

> I am not fully sure how to exactly test #47172 (but I verified manually that it fixes the memory increase), but I did add a test that fails on main and 1.4 (and worked on pandas 1.3) and passes with this fix.

looks fine. @meeseeksdev backport 1.5.x