1

初めてのアプリ エンジン サイトを始めたばかりです。Hello World のサンプルに従って、ホームページを立ち上げて実行しました。css ファイルを追加し、.css ファイルの静的ハンドラーを宣言しましたapp.yaml。完全なコンテンツは次のとおりです。

application: myapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /css/.*/(.*)
  mime_type: text/css
  static_files: css/\1
  upload: css/(.*)
  expiration: "30d"

- url: /.*
  script: myapp.app

Chrome 開発者ツールの監査機能を使用すると、CSS ファイルが明示的にキャッシュ不可であるという警告が表示されます。有効期限を延長しようとしましたが、それは役に立ちませんでした。

静的ファイルのキャッシュを有効にするために他に必要なことはありますか? サイト ダッシュボードの設定をいじっていないので、既定の設定を使用する必要があります。

4

1 に答える 1

1

When I run this same test on the SDK against localhost, I get the same warning that none of my CSS is cached and that it's set to be explicitly non-cachable.

When I deploy the app and run the test from .appspot.com, I only get a warning for the jquery CDN link, and all of my CSS files are cached.

Hope this helps.

EDIT: Looks like the files are marked as proxy-cacheable, but I'm still seeing them as non-browser cacheable.

于 2012-12-07T20:55:49.793 に答える