respect the cache option in args array

properly cache images when caching is enabled