Well known theorem due to Stallings (finished by Swan) characterises free groups as those with $cd_{\mathbb Z} \leq 1$. We can treat it as a model case and try to extrapolate somehow to other categories and homological (feel free to interprete this adjective ad lib) functors — can we characterise free objects as "1-dimensional" ones? Here are some examples with different outcomes.

 - groups, homological dimension — yes for finitely presented (by duality), false for arbitrary ($\mathbb Q$), open for finitely generated
 - Lie algebras, Chevalley cohomology — yes for 2-generated (Feldman, 1983), no for char $\geq$ 3 (Mikhalev, 90s), open otherwise
 - restricted Lie algebras, Chevalley cohomology — sort of, the only example is 1-dimensional vector space (Zusmanovich, 2010s)
 - restricted Lie algebras, restricted cohomology ($HH^*$ of univ. p-enveloping) — 0-dimensional are finite dimensional tori (exercise in Weibel's book), conjectured by Zusmanovich that any 1-dimensional has solvable series with 1 free factor and arbitrary number of tori
 - associative algebras, Hochschild cohomolology — measures different property (formal smoothness), same story but somewhat different details for commutative case

Finally, a few questions.

 1. Are there some other interesting categories with "Stallings" property? (I'm particularly interested in the case of (pre)crossed modules with , but everything goes.)
 2. Can we fit this zoo in a unified framework? 
 3. Back to beginning — every proof of Stallings' thm I'm avare of is geometric or combinatorial in nature and usually relies on Grushko rank theorem which is again an essentially combinatorial statement. Is there a purely homological one?