Tasks #tp321, #tp322, #tp324: Caching of individual rates, Python and C++ parts.