PLA-399 improve code style (mainly whitespaces)
PLA-399 copy cache object before returning it.