Caching statistics had always the same key, regardless of API parameters...

.... Fixes #860