danwent/Perspectives-Server — pull request #18 by daveschaefer (2013-03-19 13:59:13+00:00)
Title: In-memory caching using only python

Here is a module that implements Least Recently Used caching using only python. This can be used on servers that don't have a dedicated caching system.

In my performance tests I hit the server with 200 requests per second for 60 seconds, 20 reps. Using --pycache vs no caching showed these improvements:

200% average responses/requests served (4,041 -> 8,094)
86% avg timeouts (1715 -> 1484)
8% response time (546ms -> 46ms)

Additionally the server no longer became overwhelmed and unresponsive.