volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Client cache on VPP folders

Hello!

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... 

#74725
Sep 05, 2013 15:24
Vote:

Try this in your web.config:

 <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="20.0:0:0"/>
  </location>
 

    

#74742
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.

#75475
Sep 26, 2013 14:50
Vote:

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!

#75477
Sep 26, 2013 15:37

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

#75659
Oct 02, 2013 16:53
error 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.