![]() ![]() This mechanism was largely ineffective because the middleware correctly takes into account the Vary: Cookie HTTP header, and this header is being set on a variety of occasions. However, after looking up some settings, I came upon this gem:ĬacheMiddleware used to provide a way to cache requests only if they weren’t made by a logged-in user. After reading the Django documentation, I was none the wiser, everything should be working properly. What’s worse, the site loaded moderately fast for me, so I had no idea what might be going on. ![]() ![]() Ten seconds per request made no sense when all you’re doing is fetching the page from memcached, but that’s what I was seeing. I had to create new instances because the average latency was about ten seconds(!), even though this blog is pretty much only text and static media, and I use Django’s per-site cache to cache every single page. I was very happy that people were liking and discussing this post (and the discussion was very interesting in its own right), but I noticed that AppEngine, where this blog is hosted, was struggling to serve it. ![]() To my great pleasure, the post shot up to the first place in a few minutes and continued there for a full day, bringing just over 50,000 visitors to this blog, in total. Since it was interesting bit of code, I thought Hacker News would enjoy it, so I posted it there. A few days ago, I wrote a post about a peculiar piece of code that a friend of mine had sent me. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |