{ "info": { "author": "Andras Biczo", "author_email": "abiczo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=========\nPageCache\n=========\n\nWSGI caching middleware.\n\nPageCache is a WSGI middleware that can be used to cache complete responses\nfrom WSGI applications. PageCache works well with memcached but can be used\nwith other caching backends as well.\n\nPageCache has not been widely tested, use with caution.\n\nUsage\n=====\n\nHere's a simple example to get you started::\n\n from pagecache import PageCacheMiddleware\n \n app = ...\n cache = memcache.Client(...)\n cached_urls = (('/foo', 30, 120), # url prefix, TTL, grace period\n ('/bar', 3600, 60))\n app = PageCacheMiddleware(app, cached_urls, cache)\n\nCached urls\n-----------\n\nThe list of urls to cache is given in the ``cached_urls`` list (or tuple).\nEach entry of this list is a tuple in the following format:\n``(, , )``\n\nPages are served from the cache in the TTL period. When the TTL period has\nexpired the grace period begins. The first request coming in in the grace\nperiod will recalculate the page and store the new result in the cache.\nWhile the new result is being calculated stale results are served from the\ncache (until the grace period expires). This is to protect against the\n`dog-pile effect `_\n\nThe cache object\n----------------\n\nPageCache was only tested with memcached, but it may work with other cache\nbackends as well. The only requirement is that the cache object should have\nthe following methods with reasonably similar semantics as in memcached:\n``get``, ``set``, ``delete``, ``add``\n\nA note on cookies\n-----------------\n\nAll Set-Cookie headers returned by the application will be ignored.\nAlso, depending on your application you'll most probably want to make sure\nthat the application doesn't use any incoming cookie information to calculate\nresponses that will be cached.\n\nInstall\n=======\n\nYou can install the latest version from the\n`github repository `_::\n\n git clone git://github.com/abiczo/pagecache.git\n cd pagecache\n python setup.py install\n\nTODO\n====\n\n* more unit testing\n* better syntax for the cached urls configuration\n* regexp based url matching\n* configurable cache keys (so that multiple applications can use the same\n memcached instance without having to worry about having the same cached urls)\n* configurable request charset\n\nPatches / pull-requests are welcome.\n\nContact\n=======\n\nabiczo@gmail.com", "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/abiczo/pagecache", "keywords": "cache wsgi", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pagecache", "package_url": "https://pypi.org/project/pagecache/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pagecache/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/abiczo/pagecache" }, "release_url": "https://pypi.org/project/pagecache/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Page caching WSGI middleware", "version": "0.1.1" }, "last_serial": 795966, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "26c018599d35022c536359daea40cc25", "sha256": "7b0816b15c66f331088d5b2518c4bc513fb216a3b31ee074aae80d05abc5c55b" }, "downloads": -1, "filename": "pagecache-0.1.tar.gz", "has_sig": false, "md5_digest": "26c018599d35022c536359daea40cc25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4101, "upload_time": "2010-08-13T21:31:14", "url": "https://files.pythonhosted.org/packages/30/8f/8954911910da24f323891c9c7c281ea77ae6ba7d43f3149b4817270e4152/pagecache-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "045a472f02f33f822118c4d70156ae9a", "sha256": "63bd2dd422a97b7b5da8efb2b1ce510d1024c9d765fd206a87bb342c405d54bd" }, "downloads": -1, "filename": "pagecache-0.1.1.tar.gz", "has_sig": false, "md5_digest": "045a472f02f33f822118c4d70156ae9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4413, "upload_time": "2010-08-13T21:34:03", "url": "https://files.pythonhosted.org/packages/7c/3a/b9cc7cb0460d674af01d0ae13beb884c20e97011039ac423ec4ec779d316/pagecache-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "045a472f02f33f822118c4d70156ae9a", "sha256": "63bd2dd422a97b7b5da8efb2b1ce510d1024c9d765fd206a87bb342c405d54bd" }, "downloads": -1, "filename": "pagecache-0.1.1.tar.gz", "has_sig": false, "md5_digest": "045a472f02f33f822118c4d70156ae9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4413, "upload_time": "2010-08-13T21:34:03", "url": "https://files.pythonhosted.org/packages/7c/3a/b9cc7cb0460d674af01d0ae13beb884c20e97011039ac423ec4ec779d316/pagecache-0.1.1.tar.gz" } ] }