0

I have a pretty simple Java web app that follows the usual directory structure that Maven expects.

When I run the application locally ( mvn -D skipTests clean package appengine:run ) files which are requested from the css directory are given an expiry date of 10 minutes. Files from the js directory don't seem to be given an expiry date at all. Both of these directories are at the same level, directly beneath my webapp directory.

I don't believe that I have configured the css and js directories differently, so I would expect them both to get the default expiration of 10 minutes. What am I doing wrong?

enter image description here

DaveH
  • 7,187
  • 5
  • 32
  • 53
  • Without the relevant part of the pom.xml file it's hard to know what's going on. I would suggest to check this [section](https://cloud.google.com/appengine/docs/standard/java/config/appref#static_cache_expiration) of the docs where it explains how to set cache expiration parameters. Also it may be worth checking if the path wildcards are well configured. – Happy-Monad Jul 09 '20 at 10:07
  • @Happy-Monad : what details from the pom.xml would you need to see? – DaveH Jul 12 '20 at 19:30

1 Answers1

1

It seems the following is required in appengine.web.xml

<static-files>
    <include path="/**.js" expiration="10m" />
</static-files>
DaveH
  • 7,187
  • 5
  • 32
  • 53