关于响应时间、实例小时数和缓存效率,以下哪种配置对于 Python 2.7 上的 Google App Engine 最有效:
配置 1
应用程序.yaml:
handlers:
- url: /db/script/.*
script: db/script/crud.app
secure: always
- url: /db/state/.*
script: db/state/crud.app
secure: always
- url: /db/var/.*
script: db/var/crud.app
secure: always
或配置 2
应用程序.yaml:
handlers:
- url: /.*
script: main.app
secure: always
使用 main.py:
app = webapp2.WSGIApplication([
('/db/script/.*', db.Script.Crud),
('/db/state/.*', db.State.Crud),
('/db/var/.*', db.Var.Crud)
])