public static function PrepareCache($CacheName, $ExistingCacheArray = NULL, $CacheMode = 'flat') {
      // Onetime initialization of in-memory file cache
      if (!is_array(self::$Caches)) 
         self::$Caches = array();
      
      if ($CacheName != 'locale') return;

      if (!array_key_exists($CacheName,self::$Caches)) {
         
         self::$Caches[$CacheName] = array(
            'cache'     => array(),
            'mode'      => $CacheMode
         );
         
         $UseCache = (Gdn::Cache()->Type() == Gdn_Cache::CACHE_TYPE_MEMORY && Gdn::Cache()->ActiveEnabled());
         if ($UseCache) {
            
            $CacheKey = sprintf(Gdn_LibraryMap::CACHE_CACHE_NAME_FORMAT, $CacheName);
            $CacheContents = Gdn::Cache()->Get($CacheKey);
            $LoadedFromCache = ($CacheContents !== Gdn_Cache::CACHEOP_FAILURE);
            if ($LoadedFromCache && is_array($CacheContents))
               self::Import($CacheName, $CacheContents);
            
         } else {
            
            $OnDiskCacheName = sprintf(self::DISK_CACHE_NAME_FORMAT,strtolower($CacheName));
            self::$Caches[$CacheName]['ondisk'] = $OnDiskCacheName;

            // Loading cache for the first time by name+path only... import data now.
            if (file_exists(PATH_CACHE.DS.$OnDiskCacheName)) {
               $CacheContents = parse_ini_file(PATH_CACHE.DS.$OnDiskCacheName, TRUE);
               if ($CacheContents != FALSE && is_array($CacheContents)) {
                  self::Import($CacheName, $CacheContents);
               } else
                  @unlink(PATH_CACHE.DS.$OnDiskCacheName);
            }
            
         }
      }
      
      // If cache data array is passed in, merge it with our existing cache
      if (is_array($ExistingCacheArray))
         self::Import($CacheName, $ExistingCacheArray, TRUE);
   }