Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Try

...

not

...

to

...

download

...

the

...

same

...

file

...

twice.

...

Improve

...

cache

...

efficiency

...

and

...

speed

...

up

...

downloads.

...

Take

...

standard

...

headers

...

and

...

knowledge

...

about

...

objects

...

in

...

the

...

cache

...

and

...

potentially

...

rewrite

...

those

...

headers

...

so

...

that

...

a

...

client

...

will

...

use

...

a

...

URL

...

that

...

's already

...

cached

...

instead

...

of

...

one

...

that

...

isn't.

...

The

...

headers

...

are

...

specified

...

in

...

RFC

...

6249 (Metalink/HTTP:

...

Mirrors

...

and

...

Hashes)

...

and

...

RFC

...

3230

...

(

...

Instance

...

Digests

...

in

...

HTTP)

...

and

...

are

...

sent

...

by

...

various

...

download

...

redirectors

...

or

...

content

...

distribution

...

networks.

...

...

...

When it sees a response with a "Location: ..."

...

header

...

and

...

a

...

"Digest:

...

SHA-256=..."

...

header,

...

it

...

checks

...

if

...

the

...

URL

...

in

...

the

...

Location

...

header

...

is

...

already

...

cached.

...

If

...

it

...

isn't,

...

then

...

it

...

tries

...

to

...

find

...

a

...

URL

...

that

...

is

...

cached

...

to

...

use

...

instead.

...

It

...

looks

...

in

...

the

...

cache

...

for

...

some

...

object

...

that

...

matches

...

the

...

digest

...

in

...

the

...

Digest

...

header

...

and

...

if

...

it

...

succeeds,

...

then

...

it

...

rewrites the

...

Location

...

header

...

with

...

that

...

object

...

's URL.

This way a client should get sent to a URL that's

...

already

...

cached

...

and

...

won't

...

download the file again.

...

...

...

Just build the plugin and add it to your plugin.config file.

The code is distributed along with recent versions of Traffic Server, in the plugins/experimental/metalink directory. To build it, pass the --enable-experimental-plugins

...

option

...

to

...

the

...

configure

...

script

...

when

...

you

...

build

...

Traffic

...

Server:

...

Code Block
languagebash

When you're

...

done

...

building

...

Traffic

...

Server,

...

add

...

"metalink.so"

...

to

...

your

...

plugin.config

...

file

...

to

...

start

...

using

...

the

...

plugin.

...

...

...

...

...