I have a somewhat easy looking question on parabolic function spaces:

Let $B$ be a ball in $\mathbb R^n$ and let $T>0$. Denote $Q:=B \times [0,T]$. Assume $f \in L^2(Q) \cap L^\infty(0,T; L^q(B))$ for every $1 \le q <2$. Does this imply that $f \in L^\infty(0, T; L^2(B))$?

I tried to build a counterexample, but at least my first attempt failed. I decided to ask here, because this is probably very easy for an expert. In addition, I would be interested in knowing what might be a good reference for such results, in general, for parabolic function spaces?