kernel/classes/ezurlwildcard.php
protected static function createWildcardsIndex()
    {
        self::cacheInfoDirectories( $wildcardCacheDir, $wildcardCacheFile, $wildcardCachePath, $wildcardKeys );
        if ( !file_exists( $wildcardCacheDir ) )
        {
            eZDir::mkdir( $wildcardCacheDir, false, true );
        }

        // Index file (wildcard_md5_index.php)
        $wildcardsIndex = array();

        $limit = self::WILDCARDS_PER_CACHE_FILE;
        $offset = 0;
        $cacheFilesCount = 0;
        $wildcardNum = 0;
        while( 1 )
        {
            $wildcards = self::fetchList( $offset, $limit, false );
            if ( count( $wildcards ) === 0 )
            {
                break;
            }

            // sub cache file (wildcard_md5_<i>.php)
            $wildcardDetails = array();
            $currentSubCacheFile = self::loadCacheFile( $cacheFilesCount );
            foreach ( $wildcards as $wildcard )
            {
                $wildcardsIndex[] = self::matchRegexpCode( $wildcard );
                $wildcardDetails[$wildcardNum] = self::matchReplaceCode( $wildcard );

                ++$wildcardNum;
            }
            $binaryData = "<" . "?php\nreturn ". var_export( $wildcardDetails, true ) . ";\n?" . ">\n";
            $currentSubCacheFile->storeContents( $binaryData, "wildcard-cache-$cacheFilesCount", 'php', true );

            $offset += $limit;
            ++$cacheFilesCount;
        }

        $indexCacheFile = self::loadCacheFile();
        $indexBinaryData = "<" . "?php\nreturn ". var_export( $wildcardsIndex, true ) . ";\n?" . ">\n";
        $indexCacheFile->storeContents( $indexBinaryData, "wildcard-cache-index", 'php', true );

        return $wildcardsIndex;
        // end index cache file
    }
protected static function createWildcardsIndex()
    {
        self::cacheInfoDirectories( $wildcardCacheDir, $wildcardCacheFile, $wildcardCachePath, $wildcardKeys );
        if ( !file_exists( $wildcardCacheDir ) )
        {
            eZDir::mkdir( $wildcardCacheDir, false, true );
        }

        // Index file (wildcard_md5_index.php)
        $wildcardsIndex = array();

        $limit = self::WILDCARDS_PER_CACHE_FILE;
        $offset = 0;
        $cacheFilesCount = 0;
        $wildcardNum = 0;
        while( 1 )
        {
            $wildcards = self::fetchList( $offset, $limit, false );
            if ( count( $wildcards ) === 0 )
            {
                break;
            }

            // sub cache file (wildcard_md5_<i>.php)
            $wildcardDetails = array();
            $currentSubCacheFile = self::loadCacheFile( $cacheFilesCount );
            foreach ( $wildcards as $wildcard )
            {
                $wildcardsIndex[] = self::matchRegexpCode( $wildcard );
                $wildcardDetails[$wildcardNum] = self::matchReplaceCode( $wildcard );

                ++$wildcardNum;
            }
            $binaryData = "<" . "?php\nreturn ". var_export( $wildcardDetails, true ) . ";\n?" . ">\n";
            $currentSubCacheFile->storeContents( $binaryData, "wildcard-cache-$cacheFilesCount", 'php', true );

            $offset += $limit;
            ++$cacheFilesCount;
        }

        $indexCacheFile = self::loadCacheFile();
        $indexBinaryData = "<" . "?php\nreturn ". var_export( $wildcardsIndex, true ) . ";\n?" . ">\n";
        $indexCacheFile->storeContents( $indexBinaryData, "wildcard-cache-index", 'php', true );

        return $wildcardsIndex;
        // end index cache file
    }
protected static function createWildcardsIndex ( ) { self :: cacheInfoDirectories ( $ wildcardCacheDir , $ wildcardCacheFile , $ wildcardCachePath , $ wildcardKeys ) ; if ( ! file_exists ( $ wildcardCacheDir ) ) { eZDir :: mkdir ( $ wildcardCacheDir , false , true ) ; } // Index file (wildcard_md5_index.php) $ wildcardsIndex = array ( ) ; $ limit = self :: WILDCARDS_PER_CACHE_FILE ; $ offset = 0 ; $ cacheFilesCount = 0 ; $ wildcardNum = 0 ; while ( 1 ) { $ wildcards = self :: fetchList ( $ offset , $ limit , false ) ; if ( count ( $ wildcards ) === 0 ) { break ; } // sub cache file (wildcard_md5_<i>.php) $ wildcardDetails = array ( ) ; $ currentSubCacheFile = self :: loadCacheFile ( $ cacheFilesCount ) ; foreach ( $ wildcards as $ wildcard ) { $ wildcardsIndex [ ] = self :: matchRegexpCode ( $ wildcard ) ; $ wildcardDetails [ $ wildcardNum ] = self :: matchReplaceCode ( $ wildcard ) ; ++ $ wildcardNum ; } $ binaryData = "<" . "?php\nreturn " . var_export ( $ wildcardDetails , true ) . ";\n?" . ">\n" ; $ currentSubCacheFile -> storeContents ( $ binaryData , "wildcard-cache-$cacheFilesCount" , 'php' , true ) ; $ offset += $ limit ; ++ $ cacheFilesCount ; } $ indexCacheFile = self :: loadCacheFile ( ) ; $ indexBinaryData = "<" . "?php\nreturn " . var_export ( $ wildcardsIndex , true ) . ";\n?" . ">\n" ; $ indexCacheFile -> storeContents ( $ indexBinaryData , "wildcard-cache-index" , 'php' , true ) ; return $ wildcardsIndex ; // end index cache file }
Create the wildcard cache

The wildcard caches are splitted between several files:
'wildcard_<md5>_index.php': contains regexps for wildcards
'wildcard_<md5>_0.php',
'wildcard_<md5>_1.php',
...
'wildcard_<md5>_N.php': contains cached wildcards.
Each file has info about eZURLWildcard::WILDCARDS_PER_CACHE_FILE wildcards.

@return array
Create the wildcard cache