shadow: add shadow caching support for image backend