/api/active_runs still returns a large amount data
woolf@pl2:~$ wget tests.stockfishchess.org/api/active_runs
URL transformed to HTTPS due to an HSTS policy
--2023-05-09 15:26:25-- https://tests.stockfishchess.org/api/active_runs
Resolving tests.stockfishchess.org (tests.stockfishchess.org)... 185.83.217.134
Connecting to tests.stockfishchess.org (tests.stockfishchess.org)|185.83.217.134|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 212373 (207K) [application/json]
Saving to: ‘active_runs.21’
active_runs 100%[===================>] 207,40K --.-KB/s in 0,1s
2023-05-09 15:26:26 (1,61 MB/s) - ‘active_runs.21’ saved [212373/212373]
The reason is the SPSA data, which I am actually not interested in (and I think the same holds for other users). It would be a good idea to provide the api with an optional argument to omit the SPSA data. Or even an additional projection argument.
The SPSA history is removed, the actual spsa data provided is the 'summary data'.
Yes but it is still a lot of data (207K in the above example).
But regardless of this, an additional projection argument would be useful.
The disadvantage of additional arguments would be that things can't be easily cached by nginx (or it would be less effective if the argument can take multiple values or can be combined with other arguments). So, I rather think we should try to keep it relatively simple. Right now this api has become quite unimportant for server load. Thus, not objecting if this would be needed, but saying that solving this issue with an additional argument would probably be counter productive for other potential changes.
I thought post requests are not generally cached... I think you can force the server to cache them, but the expectation is that they are not.
EDIT: Actually this is about browser side caching. So not directly applicable.