jezdez/django_compressor — pull request #214 by jaap3 (2012-02-15 19:57:30+00:00)
Title: Fetch the manifest file only once and store the result

After discussing pull request #212 (a result of issue #209) to a great extent I came up with the following solution to some of the issues people are having with the manifest file.

get_offline_manifest now uses a module level variable to store the parsed JSON. This means that the file is only retrieved and parsed once during the life-cycle of a process.

In practice this means that after deploying new static files and the corresponding manifest file all application servers (uwsgi, gunicorn etc.) need to be reloaded. Since a deployment usually involves code or template changes, this needs to happen anyway.

In effect this could be a solution to issues #168, #174 and #205.

I don't use offline compression, so I'd like to ask some of the people involved in the mentioned tickets to give this patch a try and see if it alleviates their problems.