I've created a PR for cachekey support in Traffic Ops 2+.  I wanted to email 
the list because it's a departure from the norm for plugin configuration.  
Cachekey has several options available requiring multiple pparam entries.  
Rather than try and shoehorn that into the db with a single "cachekey options" 
line, I've created code to interpret parameters for the ds profile.  When 
parameters assigned to that delivery service's profile are found for 
cachekey.config, a pparam entry is created for each parameter and its value in 
the remap.config.  For example, the following parameters, when assigned to a 
delivery service profile:


Parameter name - "ua-capture"
Parameter config file - "cachekey.config"
Parameter value - "(Mozilla/[^\s])."

Parameter name - "include-headers"
Parameter config file - "cachekey.config"
Parameter value - "H1,H2"

Will create this entry in the remap.config for that delivery service.

@plugin<https://github.com/plugin>=cachekey.so 
@pparam<https://github.com/pparam>=--ua-capture=(Mozilla/[^\s]). 
@pparam<https://github.com/pparam>=--include-headers=H1,H2

For anyone unfamiliar with delivery service profiles, these were created in 2.0 
as a way to add MSO parameters for 6.x trafficserver support.  They are useful 
for any situation in which you have a configuration that isn't necessarily used 
often and is more complex than a single text field/db column would allow.

Longer term, I'm thinking that a sub-interface could be added to the delivery 
service page (similar to the server page, or steering, etc) where these options 
could be more explicitly spelled out and modified more intuitively, but the 
full functionality is nonetheless there with this small change.

As always, I welcome your thoughts.

Derek

Reply via email to