original_string: public static function fetch($params) {
          $cache = cache::make('core', 'coursecompletion');
  
          $key = $params['userid'] . '_' . $params['course'];
          if ($hit = $cache->get($key)) {
              return $hit['value'];
          }
  
          $tocache = self::fetch_helper('course_completions', __CLASS__, $params);
          $cache->set($key, ['value' => $tocache]);
          return $tocache;
      }
code: public static function fetch($params) {
          $cache = cache::make('core', 'coursecompletion');
  
          $key = $params['userid'] . '_' . $params['course'];
          if ($hit = $cache->get($key)) {
              return $hit['value'];
          }
  
          $tocache = self::fetch_helper('course_completions', __CLASS__, $params);
          $cache->set($key, ['value' => $tocache]);
          return $tocache;
      }
code_tokens: public static function fetch ( $ params ) { $ cache = cache :: make ( 'core' , 'coursecompletion' ) ; $ key = $ params [ 'userid' ] . '_' . $ params [ 'course' ] ; if ( $ hit = $ cache -> get ( $ key ) ) { return $ hit [ 'value' ] ; } $ tocache = self :: fetch_helper ( 'course_completions' , __CLASS__ , $ params ) ; $ cache -> set ( $ key , [ 'value' => $ tocache ] ) ; return $ tocache ; }
docstring: Finds and returns a data_object instance based on params.
  
  @param array $params associative arrays varname = >value
  @return data_object instance of data_object or false if none found.
docstring_tokens: Finds and returns a data_object instance based on params .