...
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 | ||
---|---|---|
| ||
$ ./configure --enable-experimental-plugins
| ||
When you're done building Traffic Server, add "metalink.so" to your plugin.config file to start using the plugin.
...
It implements TS_HTTP_READ_RESPONSE_HDR_HOOK
and a null transformation to compute the SHA-256 digest for content as it's added to the cache. It uses SHA256_Init()
, SHA256_Update()
, and SHA256_Final()
from OpenSSL to compute the digest, then it uses TSCacheWrite()
to associate the digest with the request URL. This adds a new cache object where the key is the digest and the object is the request URL.
...