App Engine - Java Cache Control无法运行

时间:2012-11-06 08:02:11

标签: xml file google-app-engine caching static

这是一个noobie问题

我想为静态文件添加expires标头。

我试过了:

<static-files>
     <include path="/**.png" expiration="4d 5h" />
</static-files>

并将其放在 appengine-web.xml

但是每当我在egine上部署它时,引擎就不再工作了。 也许我在代码中使用了错误的位置?

以下是完整代码:

<?xml version="1.0" encoding="utf-8"?>


<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <!-- REQUIRED: CHANGE THE <application> TAG! -->
    <application>myname</application>
    <version>1</version>

        <static-files>        <include path="/**.png" expiration="4d 5h" />    </static-files>

    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
    <property name="com.google.gdata.DisableCookieHandler" value="true"/> 



    <!-- OPTIONAL: Put in your configuration values in this section. -->
    <property name="com.google.ytd.BrandingTag" value=""/>
    <property name="com.google.ytd.LinkBackText" value=""/>
    <property name="appengine.orm.disable.duplicate.pmf.exception" value="false"/>
    <property name="com.google.ytd.RecaptchaPrivateKey" value=""/>
    <property name="com.google.ytd.RecaptchaPublicKey" value=""/>  
    </system-properties>


  <ssl-enabled>true</ssl-enabled>
  <sessions-enabled>true</sessions-enabled>
  <threadsafe>false</threadsafe>


    <inbound-services>
    <service>mail</service>
  </inbound-services>
</appengine-web-app>

0 个答案:

没有答案