cache_cost={(k*cache_slot_size*(l+n)when   cached     0                                                      when   uncached)