Configure caching for staticFiles in Media system

Vote:
 

Hi,

I used to configure caching for staticFiles with following configuration before Media system is introduced in 7.5. Are there any same configuration for Media/Blob system in 7.5? How could I configure the site to cache staticFiles return from Media system?

<location path="PageFiles">
	<system.webServer>
		<handlers>
			<add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
			<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
		</handlers>
	</system.webServer>
	<staticFile expirationTime="365.00:00:00" />
</location>
<location path="Documents">
	<system.webServer>
		<handlers>
			<add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
			<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
		</handlers>
	</system.webServer>
	<staticFile expirationTime="365.00:00:00" />
</location>
<location path="Global">
	<system.webServer>
		<handlers>
			<add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
			<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
		</handlers>
	</system.webServer>
	<staticFile expirationTime="365.00:00:00" />
</location>

Thanks,

/DL

#82188
Mar 07, 2014 5:26
Vote:
 

hi

had the same issue here had a partial success

1.started with "Private" cache header the media library

2. added to the epi config

<applicationSettings
httpCacheExpiration="10.10:10:10"
httpCacheability="Public"

3. now the img returns cache header "Public"

4. not good becuase it doesnt have the MAX age header so the browser issues a 304 request ( content didn't change)

 

so still looking for the same headers from static content

the static content uses

<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="342.00:00:00">
</clientCache>
</staticContent>
<caching>
<profiles>
<add extension=".gif" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:01:00" location="Any" />
<add extension=".js" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".css" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".jpg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
</profiles>
</caching>

 

#82480
Mar 13, 2014 11:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.