Closed CurtTilmes closed 9 years ago
I was just reviewing this, and there actually is a bucket map cache, but it isn't stored persistently, so there is one request for the bucket map per process.
https://github.com/plicease/Yars-Client/commit/c8f7414b2ff996d47d5156bbb4a2eb5541e44e61
This is addressed in the next version.
Have a config option to specify a bucket map cache file.
If the file doesn't exist on start up, ask for /bucket_map and cache it in that file.
If the client sees a redirect to a different server, invalidate and re-download it.
It very, very seldom changes at all, and even if it does, the redirect will make everything work anyway, but it will save a few queries to cache it. (The current Yars::Client doesn't rely on the redirects at all, it just downloads the bucket_map every single time -- That seems like overkill for something that might not change for years.)