Speeding Up the First Page Load in django

前端 未结 2 1441
有刺的猬
有刺的猬 2021-01-30 09:15

When I update the code on my website I (naturally) restart my apache instance so that the changes will take effect.

Unfortunately the first page served by each apache in

2条回答
  •  一生所求
    2021-01-30 10:10

    How are you running Django (mod_python vs mod_wsgi)?

    If you're running mod_wsgi (in daemon mode), restarting Apache isn't necessary to reload your application. All you need to do is update the mtime of your wsgi script (which is done easily with touch).

    mod_wsgi's documentation has a pretty thorough explanation of the process:

    ReloadingSourceCode

提交回复
热议问题