When you say that cache keeps the FD open, I guess you mean libsoup.
Have you really checked that indeed libsoup is keeping the FD open? Or is just a theory? Which version of libsoup are you using? This shouldn't happen (I've asked a libsoup maintainer), so if libsoup keeps the descriptors open, the bug is in libsoup.
Though the patch is correct, it is just a workaround, and doesn't fix the real problem, which would be in the libsoup.
When you say that cache keeps the FD open, I guess you mean libsoup.
Have you really checked that indeed libsoup is keeping the FD open? Or is just a theory? Which version of libsoup are you using? This shouldn't happen (I've asked a libsoup maintainer), so if libsoup keeps the descriptors open, the bug is in libsoup.
Though the patch is correct, it is just a workaround, and doesn't fix the real problem, which would be in the libsoup.