def tilecache_path(tile_coord):
    """
    >>> tilecache_path((1234567, 87654321, 9))
    '09/001/234/567/087/654/321'
    """
    x, y, z = tile_coord
    parts = '%02d' % z, '%03d' % int(x / 1000000), '%03d' % (int(x / 1000) %
        1000), '%03d' % (int(x) % 1000), '%03d' % int(y / 1000000), '%03d' % (
        int(y / 1000) % 1000), '%03d' % (int(y) % 1000)
    return '/'.join(parts)
