Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:34:21+00:00 2026-06-10T21:34:21+00:00

What I’m doing is avoiding having requests hit Django and serving cached data straight

  • 0

What I’m doing is avoiding having requests hit Django and serving cached data straight from nginx.
Related question: Django staticgenerator vs CACHE_BACKEND

There seem to be two choices when it comes to this:
https://github.com/torchbox/django-nginx-memcache
https://github.com/mrj0/staticgenerator – This one seems easier to use

After trying django-nginx-memcache I found some downsides:

  • No fallback to serve cached content from django (can be fixed).
  • nginx has to be recompiled for md5 sum generation of urls (I don’t think this can be fixed).
    • Edit: After looking at other solutions (such as: http://soyrex.com/articles/django-nginx-memcached/) I find that there seems no need to use md5 cache_keys. Maybe this should be an option.
  • It would be nice to be able to define a list of url patters that should be cached. So far, only decorators are available (can be fixed).
  • The code should in my opinion be modelled more after the standard django cache backend with UpdateCacheMiddleware and FetchFromCacheMiddleware. This would make it easier to implement nginx cache where standard django cache solutions exist. It would also solve problem #1 (can be fixed).
  • Strange naming of module. While the project is named django-nginx-memcache, the package is named Django-Memcache-for-Nginx and the app nginx_memcache for inclusion in django installed_apps (can be fixed).

Which is faster?
Which one would you use and why?
Should I fix the issues that I have with django-nginx-memcache or is staticgenerator just better anyway?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:34:22+00:00Added an answer on June 10, 2026 at 9:34 pm

    This seems to answer all of my questions and provides a more elegant solution than django-nginx-memcache, that is patching the django cache system: http://www.willmcgugan.com/blog/tech/2009/3/1/fast-caching-with-django-and-nginx/

    Benchmarks from comment on page:

    Static content is almost 4x faster than serving from memcache with nginx.

    Request rate: 6243.8 req/s (0.2 ms/req) (static html)

    Request rate: 2285.5 req/s (0.4 ms/req) (same html in memcache)

    I think I’ll go with staticgenerator but please feel free to post your thoughts.

    Edit:

    I realized that I’m running two webservers in parallel and I would need a way to sync the cached data if I go with staticgenerator. I guess I could fork it and have it write the files on both servers through network. Any thoughts on this?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I have a text area in my form which accepts all possible characters from
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
Does anyone know how can I replace this 2 symbol below from the string
I want to construct a data frame in an Rcpp function, but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.