Cache on ajax success instead of in each handler function.