Image caching optimizations