Out of curiosity (I haven't got an IPFS installation on hand, so I can't test) -- what'd be the effect of adding a:
curl https://ipfs.io/ipfs/QmTtmsSSTH5fMQ9fn9NRXWtcZXnBBazxR8fidXcE5KB76h
before the "rm -R"-line? I'm guessing it might not be something the gateway servers are set up for doing ATM -- but maybe they should, or a cluster of IPFS node should be set up for that?I'm not sure if forcing a full download of the whole file is a waste of bandwidth, or a clever way to force the person adding a file to the cache at least perform some effort by "using" the same amount of incoming bandwidth as the cache nodes would have to on the back-end.
My initial thought was that such a system should allow "seeding" the cache by simply sending a HEAD or similar request...