xl_core_cache[ $group ][ $key ] = $data; } /** * Get the cache contents by the cache key or group. * * @param $key * @param string $group * * @return bool|mixed */ public function get_cache( $key, $group = '0' ) { if ( isset( $this->xl_core_cache[ $group ] ) && isset( $this->xl_core_cache[ $group ][ $key ] ) ) { return $this->xl_core_cache[ $group ][ $key ]; } return false; } /** * Reset the cache by group or complete reset by force param * * @param string $group * @param bool $force */ function reset_cache( $group = '0', $force = false ) { if ( true === $force ) { $this->xl_core_cache = array(); } elseif ( isset( $this->xl_core_cache[ $group ] ) ) { $this->xl_core_cache[ $group ] = array(); } } } }