Optimize caching of assets