Code Duplication    Length = 12-12 lines in 2 locations

includes/class-give-cache.php 2 locations

@@ 382-393 (lines=12) @@
379
	 *
380
	 * @return mixed
381
	 */
382
	public static function get_group( $id, $group = '' ) {
383
		$cached_data = false;
384
385
		// Bailout.
386
		if ( ! self::$instance->is_cache || empty( $id ) ) {
387
			return $cached_data;
388
		}
389
390
		$cached_data = wp_cache_get( $id, $group );
391
392
		return $cached_data;
393
	}
394
395
	/**
396
	 * Cache small chunks inside group
@@ 408-419 (lines=12) @@
405
	 *
406
	 * @return bool
407
	 */
408
	public static function set_group( $id, $data, $group = '', $expire = 0 ) {
409
		$status = false;
410
411
		// Bailout.
412
		if ( ! self::$instance->is_cache || empty( $id ) ) {
413
			return $status;
414
		}
415
416
		$status = wp_cache_set( $id, $data, $group, $expire );
417
418
		return $status;
419
	}
420
421
	/**
422
	 * Delete group cache