Added adjustable key cache limit, reduced calls