proxy: do not insert result in cache in case of an error
use structs for config, add rate limiter, add debug mode