lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
728 stars 73 forks source link

Feature Request: Categorise steam downloads using agent #86

Closed VibroAxe closed 4 years ago

VibroAxe commented 4 years ago

Describe the issue you are having

As part of the new lancache.steampowered.com domain added to steam in theory we no longer need to keep a full list of domains, just the root lancache.steampowered.com which will then request data from an upstream cache. In order to utilise this functionality fully we need to ensure that the monolithic cache_key engine can still recognise traffic. This should be dooable by cateogorising from steams agent: Valve/Steam HTTP Client 1.0

Suggested implementation

It looks like we can do this by altering the map function but we need to ensure that existing cache' are not invalidated. It SHOULD look something like this (from @crabbey on discord)

map "$http_useragent---$http_host" $cacheidentifier {
    hostnames;
    default $http_host;
    "Valve/Steam HTTP Client 1.0---*" steam;
}
Crabbey commented 4 years ago

Also worth noting, this would require modification of the cache_domains processing init script to prepend every left column with "*---".