It is correct.
Mathematically, $A$, $B$ and $C$ are foremostly linear mappings between vector spaces. Say, $A:W\to X$ and $B: V\to W$, then $C = A\circ B$ is a linear mapping $V\to X$. Practically speaking, and that's where the matrix representation stems from, you represent a mapping $V\to W$ as a member of the tensor space
$V^\ast\otimes W$, where $V^\ast$ is the dual space of $V$, that is, any linear mapping $V\to W$ can be written in the form
$$
B(v) = \sum_j\sum_k w_j\cdot b_{jk}\cdot f_k(v)
$$
where $b_{jk}$ are the coefficients characterising the mapping, and the $w_j$ form a convention-chosen basis of $W$ and the $f_k:V\to \mathbb{R}$ (or whatever field you're working over) basis of $V^\ast$. Then, we can see what the composition comes out as:
$$\begin{align}
C(v) = A(B(v)) =& \sum_l\sum_i x_l\cdot a_{li}\cdot g_i\Bigl(\sum_j\sum_k w_j\cdot b_{jk}\cdot f_k(v)\Bigr)
\\ =& \sum_{lijk} x_l\cdot a_{li}\cdot b_{jk}\cdot g_i(w_j)\cdot f_k(v)
\end{align}$$
The basis of $W$'s dual space will be chosen so that $g_i(w_j)=\delta_{ij}$, so
$$\begin{align}
C(v) =& \sum_{ljk} x_l\cdot a_{lj}\cdot b_{jk}\cdot f_k(v)
\\ =:& \sum_{lk} x_l\cdot c_{lk}\cdot f_k(v)
\end{align}$$
where you have your matrix multiplication
$$
c_{lk} = \sum_j a_{lj}\cdot b_{jk}.
$$
There are two alternative, equivalent ways to look at linear mappings, and one of them you found: you basically group
$$
A(w) = \sum_{li} x_l\cdot a_{li}\cdot g_i(w)
= \sum_l x_l\cdot \Bigl(\sum_i a_{li}\cdot g_i\Bigr)(w)
$$
...which you can do because the dual space is also a vector space; $\Bigl(\sum_i a_{li}\cdot g_i\Bigr)$ are just the row vectors of $A$ which are not in fact vectors but co-vectors—and now
$$\begin{align}
A(B(v)) =& \sum_l x_l\cdot \Bigl(\sum_i a_{li}\cdot g_i\Bigr)\Bigl(\sum_j\sum_k w_j\cdot b_{jk}\cdot f_k(v)\Bigr)
\\ =& \sum_{lk} x_l\cdot \Bigl(\sum_i a_{li}\cdot g_i\Bigr)\Bigl(\sum_jw_j\cdot b_{jk}\Bigr)\cdot f_k(v)
\end{align}$$
..and there in the middle is that scalar product between a row vector of $A$ and a column vector of $B$ (or, if you will, a row vector of $B^T$).
So yeah, this can be done and is often done in algorithms.
Does it help with cache? It can certainly help, if you naturally come by $B$ in transposed form. I think e.g. the Eigen library exploits this a lot, through lazy evaluation and pre-arranging intermediate results to come out transposed in the first place if deemend useful. If all you got is $B$ in un-transposed form though, well, the cost of transposing it (which is also not readily cache-friendly) may outweigh the cache penalty of multiplying in suboptimal order.
There are many approaches to this, it's a well studied field. But there's no silver bullet for the optimal transposition policy. (An interesting approach is to store matrices in Morton order, so that always both rows and columns have some cache coherence.)