Revert "use cache resource"

This reverts commit 7968a327ceda7cd3ade3f66bb1c01ff37e778a37.
Revert "start to remove anonymous closures"

This reverts commit 67e28d3b42b2cc15246b0ce9391e9a8fb09ef4f7.