[2796] Changed cache decorator to use one dict.