added limit to waypoint cache size

this should improve the effectiveness of the waypoint cache