Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-memory caching using only python #18

Merged
merged 7 commits into from
Mar 22, 2013

Conversation

daveschaefer
Copy link
Collaborator

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 times, and averaged the results. Using --pycache vs no caching showed these improvements with a postgress database:

100% increase in average responses/requests served in 60 seconds (4,041 -> 8,094 requests server)
13% decrease in average request timeouts in 60 seconds (1715 -> 1484 timeouts)
92% decrease in average response time (546ms -> 46ms response time)

Additionally the server no longer became overwhelmed and unresponsive.

@ghost ghost assigned daveschaefer Mar 22, 2013
daveschaefer added a commit that referenced this pull request Mar 22, 2013
In-memory caching using only python
@daveschaefer daveschaefer merged commit eb98fab into danwent:master Mar 22, 2013
@daveschaefer daveschaefer mentioned this pull request Mar 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant