{ "info": { "author": "Martin Koistinen", "author_email": "mkoistinen@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Communications", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# sisu-cache-tools\n\nBasic cache management tools for djangoCMS projects.\n\nImplements a relatively automatic cache-invalidation capability and a\n'precache' management command.\n\nThis is useful for sites that have largely static content and are using\nmemcached.\n\n## Installation\n\n```` shell\npip install sisu-cache-tools\n````\n\nThen, add `cache_tools` to your project's INSTALLED_APPS in settings.\nSisu Cache Tools does not use an database models, so no migration is\nnecessary, but it must be added to INSTALLED_APPS, or the management commands\nwill not be found and the signal handlers will not \"see\" any signals.\n\n\n## Automated Cache invalidation\n\nTo get the automated cache-invalidation, add 'taints_cache = True' as a class-\nattribute on any models that contain objects that will change the way pages\nappear. Using signals, this module will detect changes to those model objects\nand invalidate the (entire) cache.\n\nThe cache can also be cleared with:\n\n```` shell\npython manage.py clearcache\n````\n\n## Automated Varnish Cache Invalidation (via BAN)\n\n**New from version 0.1.0**\n\nAssuming there are one or more Varnish cache servers with a VCL that includes something like:\n\n```` vcl\nacl purge {\n \"appserver1.your_domain.xyz\",\n \"appserver2.your_domain.xyz\",\n \"appserver3.your_domain.xyz\",\n}\n\nsub vcl_recv {\n\n\t...\n\n if (req.request == \"DELETE\" && req.http.X-Ban-Host) {\n if ( !client.ip ~purge ) {\n error 405 \"Not allowed\";\n }\n ban(\"obj.http.x-host ~ \" + req.http.X-Ban-Host);\n error 200 \"Banned\";\n }\n\n\t...\n}\n````\n\nand you have configured a list of these servers in settings.CACHE_SERVERS:\n\n```` python\nCACHE_SERVERS = [\n\t10.0.0.1,\n\t10.0.0.2,\n]\n````\n\nand you have django.contrib.sites in use in your settings:\n\n```` python\nINSTALLED_APPS = (\n ....\n 'django.contrib.sites',\n ....\n)\n\n...\n\nSITE_ID = 1\n````\n\nSisu Cache Tools will then send a DELETE request with the header X-Ban-Host to your Varnish cache servers so that even your remote caches are \"cleared\" too.\n\n\n\n## Pre-emptive Caching\n\nWhen the operator is done with all of their changes, the might consider using:\n\n```` shell\npython manage.py precache\n````\n\nto make HTTP requests to every page found in the sitemaps defined in the\nROOT_URLCONF. This will essentially preemptively load the pages into the cache\nso your visitors will get speedy access, even if they're the first one to\n'hit' a given page.\n\nAlso, to simply review all of the URLs, the operator can use:\n\n```` shell\npython manage.py listurls\n````\n\nAnd it will print all of the known URLs to stdout.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mkoistinen/sisu-cache-tools/tarball/0.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mkoistinen/sisu-cache-tools", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "sisu-cache-tools", "package_url": "https://pypi.org/project/sisu-cache-tools/", "platform": "OS Independent", "project_url": "https://pypi.org/project/sisu-cache-tools/", "project_urls": { "Download": "https://github.com/mkoistinen/sisu-cache-tools/tarball/0.0.1", "Homepage": "https://github.com/mkoistinen/sisu-cache-tools" }, "release_url": "https://pypi.org/project/sisu-cache-tools/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "Management tools for managing the cache", "version": "0.1.6" }, "last_serial": 1369982, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "65a2b7d85708add9abae7e1dff4131d3", "sha256": "26535704fabf7967d3fb04bebaa3a84bec33ea1ead67997cc15e8ea3f8796ecf" }, "downloads": -1, "filename": "sisu-cache-tools-0.0.2.tar.gz", "has_sig": false, "md5_digest": "65a2b7d85708add9abae7e1dff4131d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3870, "upload_time": "2014-09-13T13:11:01", "url": "https://files.pythonhosted.org/packages/6a/5b/353e381cac5e75ec2bff457087f5bc02a8b3a7838a3ae897e1969484a07d/sisu-cache-tools-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d9a84308b09ab2bcd41f7ec4accbd4f7", "sha256": "7d46dc0a51971b38b4e04692ba85cbd7f1162e5029258b386d81a61f36e6e14a" }, "downloads": -1, "filename": "sisu-cache-tools-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d9a84308b09ab2bcd41f7ec4accbd4f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5116, "upload_time": "2014-09-13T13:24:58", "url": "https://files.pythonhosted.org/packages/58/ed/858a491112f70d6873a10bc2d80e704520d521d91c7a7fd78cb2c6190825/sisu-cache-tools-0.0.3.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "8cf2c9cfce41fcceab950c0241d6daf7", "sha256": "916e10048301d934dd2b724ce0e6cc2d863b61316e9dd1f60653fdb7e018cdc5" }, "downloads": -1, "filename": "sisu-cache-tools-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8cf2c9cfce41fcceab950c0241d6daf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5281, "upload_time": "2014-10-07T12:29:30", "url": "https://files.pythonhosted.org/packages/15/b0/bac9fc076b3b74693e74c892ee342647aa7911a5230f721fc4aa2644443c/sisu-cache-tools-0.0.5.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "0dd3172a96c67c6ec7cee7153f9889eb", "sha256": "7fc013affb157d67559fbfbe323654cd75fa00d102b74ad5e1929a5520597752" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0dd3172a96c67c6ec7cee7153f9889eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6382, "upload_time": "2014-10-07T13:00:53", "url": "https://files.pythonhosted.org/packages/2d/a7/3c0267f4623a65d33fd5a6a964298a97a2e0a947c72036678ffc06f7ede7/sisu-cache-tools-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4c05fc18c32dc85c7f901b1e05affd89", "sha256": "1058835fc0e74ae01a4e7e40e429102818c91b6d42fb0031b33b5500274e14ad" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4c05fc18c32dc85c7f901b1e05affd89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6379, "upload_time": "2014-10-07T13:59:05", "url": "https://files.pythonhosted.org/packages/d8/6b/3489e38a13058a5304efb720b47b6ab712ee470db7700cacfa6762c344e9/sisu-cache-tools-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2fc821f95b9e04de5f03c3c3b850ea8c", "sha256": "8eb54eef8a6872453ab078a116df10cb68161e02ab5e18ad84f5834a29051556" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2fc821f95b9e04de5f03c3c3b850ea8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6378, "upload_time": "2014-10-07T14:02:05", "url": "https://files.pythonhosted.org/packages/06/19/af054a09326e9726c4a05c4b53d420c7640319132fe67473ea6a14cfd9a4/sisu-cache-tools-0.1.2.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "2b42135916d18d911a2ae40f30d28fdd", "sha256": "b28e77d88bed550a35a875d5b7a39e41faabb7db29bb8070741a132f717788a7" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2b42135916d18d911a2ae40f30d28fdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6374, "upload_time": "2015-01-04T12:06:17", "url": "https://files.pythonhosted.org/packages/02/53/b0762c6b88cf06c7c63d9a7584e2616a62af3751c552ba4f8b8dfa44b653/sisu-cache-tools-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "a5692a7563a1d233aa5b4124f4398e4b", "sha256": "a0f3ec07b412248775945c3440658e7741cc20b53e13e8abe8e5aa89bdb3e54b" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a5692a7563a1d233aa5b4124f4398e4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6456, "upload_time": "2015-01-04T12:16:49", "url": "https://files.pythonhosted.org/packages/ce/42/9d8e346d9382842d5ad941a106b6099bffc89634be17a5207b37bf92f3ff/sisu-cache-tools-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5692a7563a1d233aa5b4124f4398e4b", "sha256": "a0f3ec07b412248775945c3440658e7741cc20b53e13e8abe8e5aa89bdb3e54b" }, "downloads": -1, "filename": "sisu-cache-tools-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a5692a7563a1d233aa5b4124f4398e4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6456, "upload_time": "2015-01-04T12:16:49", "url": "https://files.pythonhosted.org/packages/ce/42/9d8e346d9382842d5ad941a106b6099bffc89634be17a5207b37bf92f3ff/sisu-cache-tools-0.1.6.tar.gz" } ] }