  Locally repairable codes (LRCs) are designed for distributed storage systems
to reduce the repair bandwidth and disk I/O complexity during the storage node
repair process. A code with $(r,\delta)$-locality (also called an
$(r,\delta)$-LRC) can simultaneously repair up to $\delta-1$ symbols in a
codeword by accessing at most $r$ other symbols in the codeword. In this paper,
we propose a new method to calculate the $(r,\delta)$-locality of cyclic codes.
Initially, we give a description of the algebraic structure of repeated-root
cyclic codes of prime power lengths. Using this result, we derive a formula of
$(r,\delta)$-locality of these cyclic codes for a wide range of $\delta$
values. Furthermore, we calculate the parameters of repeated-root cyclic codes
of prime power lengths and obtain several infinite families of optimal cyclic
$(r,\delta)$-LRCs, which exhibit new parameters compared with existing research
on optimal $(r,\delta)$-LRCs with a cyclic structure. For the specific case of
$\delta=2$, we have comprehensively identified all potential optimal cyclic
$(r,2)$-LRCs of prime power lengths.
