4. The volume of a rectangular prism is 8 cubic centimeters, and the total surface area is 32 square centimeters. If the length, width, and height form a geometric sequence, then the sum of all the edges of this rectangular prism is $\qquad$
4.32 cm.

Let the common ratio be $q$, and the length, width, and height be $q a, a, \frac{a}{q}$, respectively. Then $a^{3}=8 \Rightarrow a=2$.
$$
\begin{array}{l}
\text { Also } 2\left(q a \cdot a+a \cdot \frac{a}{q}+q a \cdot \frac{a}{q}\right)=32 \\
\Rightarrow q+\frac{1}{q}+1=4 .
\end{array}
$$

Therefore, the sum of the 12 edges is
$$
4\left(q a+\frac{a}{q}+a\right)=8\left(q+\frac{1}{q}+1\right)=32 \text {. }
$$