Cache Fill Plugin

The speed of the response served from the cache depends on the cache speed and the client filling the object. This dependency could significantly impact all the clients requesting the object. This plugin tries to eliminate the dependence by making the original request spawn a background request to fill the cache. The initial version of this plugin relays the initial request to the origin server instead of waiting for the background request to start filling the cache as there is no easier way to find the wait time. This plugin doesn’t provide any improvement for smaller objects but could also degrade the performance as two outgoing requests for every cache update.

Using the plugin

This plugin functions as a per remap plugin.

To activate the plugin, in remap.config, simply append the below to the specific remap line:

@plugin=cache_fill.so @pparam=<config-file>

Functionality

Plugin decides to trigger a background fetch of the original (Client) request if the request/response is cacheable and cache status is TS_CACHE_LOOKUP_MISS/TS_CACHE_LOOKUP_HIT_STALE.

Future additions

  • Fetching the original request from the cache.