public static function SmartFree($ContextType = NULL, $MapResourceArray = NULL) {

      $CacheFolder = @opendir(PATH_CACHE);
      if (!$CacheFolder) return TRUE;
      while ($File = readdir($CacheFolder)) {
         $Extension = pathinfo($File, PATHINFO_EXTENSION);
         if ($Extension == 'ini' && $File != 'locale_map.ini')
            @unlink(CombinePaths(array(PATH_CACHE, $File)));
      }
      
   }