Add getCached method.