Revert "Fix memory leak in PatchCache"

This reverts commit e769cd63f2da8ed554cc902c6897ab434b840d95.