{ "info": { "author": "Praekelt Foundation", "author_email": "dev@praekelt.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Djanginxed\n==========\n**Django Nginx Memcached integration.**\n\nProvides a view decorator caching content in Memcached for easy retrieval via Nginx. The cache is keyed by md5 of full request path (which includes GET parameters).\n\n.. contents:: Contents\n :depth: 3\n\nInstallation\n------------\n\n#. Install or add djanginxed to your Python path.\n#. Setup Memcached appropriately as described in `Django's cache framework docs `_.\n#. Optionally, set the ``CACHE_MIDDLEWARE_KEY_PREFIX`` setting in your Django's settings file -- If the cache is shared across multiple sites using the same Django installation, set this to the name of the site, or some other string that is unique to the Django instance, to prevent key collisions::\n\n CACHE_MIDDLEWARE_KEY_PREFIX = \"site1\"\n\n#. Install Nginx with the `set_hash module `_. This module is required to compute md5 cache keys from within Nginx, i.e.::\n\n set_md5 $memcached_key $request_uri;\n \n#. Configure Nginx for direct Memcached page retrieval, i.e::\n \n location / {\n default_type text/html;\n set_md5 $memcached_key $request_uri;\n memcached_pass 127.0.0.1:11211;\n error_page 404 405 500 @django;\n }\n \n location @django {\n fastcgi_pass 127.0.0.1:7000;\n fastcgi_param GATEWAY_INTERFACE CGI/1.1;\n fastcgi_param DOCUMENT_URI $document_uri;\n fastcgi_param DOCUMENT_ROOT $document_root;\n fastcgi_param REQUEST_METHOD $request_method;\n fastcgi_param REQUEST_URI $request_uri;\n fastcgi_param REMOTE_ADDR $remote_addr;\n fastcgi_param REMOTE_PORT $remote_port;\n fastcgi_param QUERY_STRING $query_string;\n fastcgi_param CONTENT_TYPE $content_type;\n fastcgi_param CONTENT_LENGTH $content_length;\n fastcgi_param SERVER_ADDR $server_addr;\n fastcgi_param SERVER_PROTOCOL $server_protocol;\n fastcgi_param SERVER_PORT $server_port;\n fastcgi_param SERVER_NAME $server_name;\n fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;\n fastcgi_param PATH_INFO $fastcgi_script_name;\n }\n\n#. Optionally, when using a cache key prefix, include it during Nginx ``$memcached_key`` generation::\n\n set_md5 $memcached_key site1$request_uri;\n\nUsage\n-----\n\nDecorators\n~~~~~~~~~~\n\ndjanginxed.decorators.cache.cache_page\n++++++++++++++++++++++++++++++++++++++\n\nThe ``cache_page`` decorator caches view response content in Memcached suitable for lookup by Nginx. ``cache_page`` takes a single argument: the cache timeout, in seconds.\n\nExample::\n\n from djanginxed.decorators.cache import cache_page\n\n @cache_page(60 * 15)\n def my_view(request):\n ...\n\nThis will cache the view's response string in Memcached for 15 minutes (60 * 15), with the cache key generated from the full request path.\n\n**NOTE: The resulting HttpResponse object's content value is stored in Memcached and not the actual HttpResponse object.**\n\n``cache_page`` can also take an optional keyword argument, ``key_prefix``, which works in the same way as the ``CACHE_MIDDLEWARE_KEY_PREFIX`` setting for the middleware. It can be used like this::\n \n @cache_page(60 * 15, key_prefix=\"site1\")\n def my_view(request):\n ...\n\n\nAuthors\n=======\n\n* Shaun Sephton\n\nChangelog\n=========\n\n0.0.5\n-----\n#. Added ability to use custom cache key generator.\n\n0.0.4\n-----\n#. Tests and polish.\n\n0.0.1\n-----\n#. Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/shaunsephton/djanginxed", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "djanginxed", "package_url": "https://pypi.org/project/djanginxed/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/djanginxed/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/shaunsephton/djanginxed" }, "release_url": "https://pypi.org/project/djanginxed/0.0.5/", "requires_dist": null, "requires_python": null, "summary": "Django Nginx Memcached integration.", "version": "0.0.5" }, "last_serial": 4624003, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "19c0effdabce8402c0c6917f8dc68146", "sha256": "4a20410c4080b70f8d8bae1d6781cda575218c9539937736725fefe80d8806a9" }, "downloads": -1, "filename": "djanginxed-0.0.1-py2.6.egg", "has_sig": false, "md5_digest": "19c0effdabce8402c0c6917f8dc68146", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 3821, "upload_time": "2011-02-08T12:51:51", "url": "https://files.pythonhosted.org/packages/28/55/bd3d3317d0b67d807d2a85629244dffe0da0a4c361948db09f759186c609/djanginxed-0.0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "1185b17f079c98d22bb1fffc94358d77", "sha256": "f8467f977fedd36ec99a0a50c8912c3a069f27c15053e63619853bfd50476f6d" }, "downloads": -1, "filename": "djanginxed-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1185b17f079c98d22bb1fffc94358d77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2829, "upload_time": "2011-02-08T12:51:53", "url": "https://files.pythonhosted.org/packages/e0/7b/95fb51b497c059af9daaf886fcb69f013b258f863536730947e5240ba997/djanginxed-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "782eaa4d467c800368980b549e6e1509", "sha256": "59bcbd3415a3b942179c63d5605273b87dd2b4d2048aac99c1685f3c1bd87cfd" }, "downloads": -1, "filename": "djanginxed-0.0.2-py2.6.egg", "has_sig": false, "md5_digest": "782eaa4d467c800368980b549e6e1509", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 3857, "upload_time": "2011-02-08T14:24:54", "url": "https://files.pythonhosted.org/packages/2e/b6/8a71fe11ae68a8b3cac0b5d38a60472631ad8ff20d5580bb3616c9f1f636/djanginxed-0.0.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "7d2d0a5412fe1418eccaac774a5d9b40", "sha256": "a66207326f9eff9c869be27fbe09e3969bc9bef509f5d55452055ca91f6d48b0" }, "downloads": -1, "filename": "djanginxed-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7d2d0a5412fe1418eccaac774a5d9b40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2849, "upload_time": "2011-02-08T14:24:55", "url": "https://files.pythonhosted.org/packages/38/0b/4d74e6585348595cd6a5a76c3000c0f0845bdbd970c41b7362cb731288cb/djanginxed-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1cfc5a47f7655f38179c050b20372ddc", "sha256": "63ef19ceb3bc47a3744e1f57e9c8f9558ab561c0b76d147eb0ab335cb9fead82" }, "downloads": -1, "filename": "djanginxed-0.0.3-py2.6.egg", "has_sig": false, "md5_digest": "1cfc5a47f7655f38179c050b20372ddc", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 3870, "upload_time": "2011-02-08T15:29:19", "url": "https://files.pythonhosted.org/packages/cf/23/683005fda9096c54fb3856927070d5f5717ab363583c278a638f27afa6cb/djanginxed-0.0.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "a7ac95c3ee75210b19b4f39eba89e79e", "sha256": "fe2e80f1bb8d198826c6c375e97b956f5f2ed3437750e8c7c19f6e4661c75a72" }, "downloads": -1, "filename": "djanginxed-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a7ac95c3ee75210b19b4f39eba89e79e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2848, "upload_time": "2011-02-08T15:29:21", "url": "https://files.pythonhosted.org/packages/c2/a0/e2448817a32d370fdf4bdb95c122b378e4e7a1e3b9955551d87034018989/djanginxed-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "11dbee54726d2b2890cf1f0e9577f9e6", "sha256": "2723a032a32c1fcea6b3f884259f45cfa27205c3f243bd29539565a4b4225f42" }, "downloads": -1, "filename": "djanginxed-0.0.4-py2.6.egg", "has_sig": false, "md5_digest": "11dbee54726d2b2890cf1f0e9577f9e6", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7343, "upload_time": "2011-02-09T09:25:07", "url": "https://files.pythonhosted.org/packages/f9/29/c48b40895afdce1bafbffd0ff99602fb6678d47430d5da8c6a33d8ebf943/djanginxed-0.0.4-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "14e067abeadce64ab3274deec00a9e38", "sha256": "fc65f09c8ed5d7be1dd676789bf326eb3db01a9c042c792e70a983eefc418f92" }, "downloads": -1, "filename": "djanginxed-0.0.4.tar.gz", "has_sig": false, "md5_digest": "14e067abeadce64ab3274deec00a9e38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4945, "upload_time": "2011-02-09T09:25:08", "url": "https://files.pythonhosted.org/packages/bc/84/c6e32f84ee1cb838c4264f340643ee0196ff8b2161a56024169a36945553/djanginxed-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c33d7fcdb5336f4aa7a388a5166a4c60", "sha256": "ec4d65b7a3521da18d7e4a2902530f8853a332d00e19c3f06707c4defdb02e63" }, "downloads": -1, "filename": "djanginxed-0.0.5-py2.6.egg", "has_sig": false, "md5_digest": "c33d7fcdb5336f4aa7a388a5166a4c60", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7865, "upload_time": "2011-02-16T09:52:40", "url": "https://files.pythonhosted.org/packages/13/76/95573c8392928b8f1f1817b3c8a1f7db30c3bf1dfc5540af7eba88ef1f1a/djanginxed-0.0.5-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "6f02e1cc2be112d04b009fee5167597b", "sha256": "e13a0ce1177a79e97d98311e1066b3c08428e154c7fbad2cc17596bcb3b80dc0" }, "downloads": -1, "filename": "djanginxed-0.0.5.tar.gz", "has_sig": false, "md5_digest": "6f02e1cc2be112d04b009fee5167597b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5162, "upload_time": "2011-02-16T09:52:42", "url": "https://files.pythonhosted.org/packages/0b/53/c0fc6bfc62951e96ad90d40d3819d8bcfbc02fa3439e66c18899a6c16aaa/djanginxed-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c33d7fcdb5336f4aa7a388a5166a4c60", "sha256": "ec4d65b7a3521da18d7e4a2902530f8853a332d00e19c3f06707c4defdb02e63" }, "downloads": -1, "filename": "djanginxed-0.0.5-py2.6.egg", "has_sig": false, "md5_digest": "c33d7fcdb5336f4aa7a388a5166a4c60", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 7865, "upload_time": "2011-02-16T09:52:40", "url": "https://files.pythonhosted.org/packages/13/76/95573c8392928b8f1f1817b3c8a1f7db30c3bf1dfc5540af7eba88ef1f1a/djanginxed-0.0.5-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "6f02e1cc2be112d04b009fee5167597b", "sha256": "e13a0ce1177a79e97d98311e1066b3c08428e154c7fbad2cc17596bcb3b80dc0" }, "downloads": -1, "filename": "djanginxed-0.0.5.tar.gz", "has_sig": false, "md5_digest": "6f02e1cc2be112d04b009fee5167597b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5162, "upload_time": "2011-02-16T09:52:42", "url": "https://files.pythonhosted.org/packages/0b/53/c0fc6bfc62951e96ad90d40d3819d8bcfbc02fa3439e66c18899a6c16aaa/djanginxed-0.0.5.tar.gz" } ] }