summaryrefslogtreecommitdiff
path: root/main/middleware.py
AgeCommit message (Collapse)Author
2013-01-15Add new AlwaysCommitMiddleware to the stackDan McGee
The reason for this is documented in the middleware itself. Without this, pgbouncer is of little use to us since it has to throw away every connection we try to route through it because of unclean disconnects. In theory, with the switch to using pgbouncer for all WSGI originating connections and adding this middleware, we should see a notable decrease in connection time to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03Remove all cache middlewareDan McGee
It's time to stop serving up stale pages. Remove this middleware caching and start pushing it down to spots where we can actually control it more appropriately (and only cache things that are expensive anyway). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-11Pylint suggested and other cleanupsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Remove AutoUserMiddlewareDan McGee
This was having some serious effects on caching as we would always have to access the user in the session, marking every page with a "Vary: Cookie" header. This is the start of stamping that out. The way we get the user for news item creation is now more similar to that from the todo lists, but not quite. That should be adjusted to be more like the news item creation. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Add a hacked version of Django UpdateCacheMiddlewarerelease_2010-05-04Dan McGee
This is to address a rather large issue with caching of feed objects in Django. Because they are built up using an XML library that does multiple writes on a file-like object, a single feed object, even when pulled from memcached, generates 1582 writes to the open socket rather than the optimal one it could do. Some version of this fix will be making it upstream, but I need to figure out how to approach that before I do so and for now this will address one of our larger performance issues on the live site since the packages feed is hit as often as it is. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-09Fix the get_user middleware stuffDan McGee
First off, the copyright notice is from the other middleware previously removed, so all of that can go, along with some stragglers in the import list. Next, as stated on http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser, you need to be sure to have the import in the model class be the same as the import used in the middleware declaration, which was not true. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-09removed RequireLoginMiddlewareIsmael Carnales
2008-10-11separate copyrighted middleware from my additionsDusty Phillips
2008-10-05use an autouser middleware to set the creator of an objectDusty Phillips
2008-04-09Added/changed full site login middleware.eliott