cachesolve code