/**
  * Retorna o que estiver cacheado
  * @param string $group 
  * @param string $id
  * @example $value = XCache(__METHOD__, $post_id);
  * @return mixed o que estiver cacheado ou null se o cache não existir
  */
 public static function get($group, $id)
 {
     $result = MCache::get($group, $id);
     if (!is_null($result)) {
         $result = DCache::get($group, $id);
     }
     return $result;
 }
 static function getPart($slug)
 {
     $_part_vars = array();
     $name = null;
     for ($i = 1; $i < func_num_args(); $i++) {
         $arg = func_get_arg($i);
         if (is_array($arg)) {
             $_part_vars = $arg;
         }
         if (is_string($arg)) {
             $name = $arg;
         }
     }
     $___use_cache = isset($_part_vars['__CACHE']) && $_part_vars['__CACHE'];
     if ($___use_cache) {
         $___cache_id = serialize(func_get_args());
         if (DCache::exists(__METHOD__, $___cache_id, $_part_vars['__CACHE'])) {
             return DCache::get(__METHOD__, $___cache_id);
         }
     }
     $slug = 'parts/' . $slug;
     if ($name) {
         $templates[] = "{$slug}-{$name}.php";
     }
     $templates[] = "{$slug}.php";
     // extraindo as variaveis
     extract($_part_vars, EXTR_PREFIX_INVALID, 'var');
     global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
     if (is_array($wp_query->query_vars)) {
         extract($wp_query->query_vars, EXTR_SKIP);
     }
     ob_start();
     foreach ($templates as $filename) {
         if (file_exists(get_stylesheet_directory() . '/' . $filename)) {
             require get_stylesheet_directory() . '/' . $filename;
             break;
         } else {
             if (file_exists(get_template_directory() . '/' . $filename)) {
                 require get_template_directory() . '/' . $filename;
                 break;
             }
         }
     }
     $html = ob_get_clean();
     if ($___use_cache) {
         DCache::set(__METHOD__, $___cache_id, $html);
     }
     return $html;
 }