Try our conversational search powered by Generative AI!

Client cache on VPP folders



What would be the proper way to set for example client cache timeout on VPP folders?

As an example I've tried to do a location setting for "Global" in web.config but it doesn't seem to go through. I'm stuck on a 10h timeout whatever I do but on any other static folder it works fine... 

Sep 05, 2013 15:24

Try this in your web.config:

 <location path="PageFiles">
        <add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader"/>
        <add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer"/>
    <staticFile expirationTime="20.0:0:0"/>


Edited, Sep 06, 2013 6:40

This does not work, complaints about the <staticFile>. Should it be <system.webServer><staticContent>? Although I couldn't get that to work either directly with VPP folders :-( So I would also be more than happy to hear about correct way to set client expiration time for vpp served files.

Sep 26, 2013 14:50

Ah I was just missing the section declaration from configsections:

    <section name="staticFile" type="EPiServer.Framework.Configuration.StaticFileSection, EPiServer.Framework" allowLocation="true" />      

With this and the config from Christian I gont headers working!

Sep 26, 2013 15:37

Yes I got it working too combining Jannes and Christians code. Thank you!

Oct 02, 2013 16:53
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.