I kind of adopted plugin Cache Images whose original author was infamous Matt Mullenweg, co-founder of WordPress. Since I needed this functionality for my own needs, and this (and all similar plugins) was outdated, I rewrote it and send my changes to Matt who in turn gave me rights to update this plugin in wordpress.org SVN repository.
You can now download it from here.