add solve cache functions with comments