key_total_students_enrolled}"; $this->set_cache( $key, $total ); } public function get_total_students_enrolled( $course_id ) { $key = "{$course_id}/{$this->key_total_students_enrolled}"; return $this->get_cache( $key ); } public function clean_total_students_enrolled( $course_id ) { $key = "{$course_id}/{$this->key_total_students_enrolled}"; $this->clear( $key ); } public function set_total_students_enrolled_or_purchased( $course_id, $total ) { $key = "{$course_id}/{$this->key_total_students_enrolled_or_purchased}"; $this->set_cache( $key, $total ); LP_Cache::cache_load_first( 'set', $key, $total ); } public function get_total_students_enrolled_or_purchased( $course_id ) { $key = "{$course_id}/{$this->key_total_students_enrolled_or_purchased}"; $total = LP_Cache::cache_load_first( 'get', $key ); if ( false !== $total ) { return $total; } $total = $this->get_cache( $key ); LP_Cache::cache_load_first( 'set', $key, $total ); return $total; } public function clean_total_students_enrolled_or_purchased( $course_id ) { $key = "{$course_id}/{$this->key_total_students_enrolled_or_purchased}"; $this->clear( $key ); } }