cache and curry