{ "info": { "author": "MapMyFitness", "author_email": "coreteam@mapmyfitnessinc.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=====================\nDjango Gzipping Cache\n=====================\n\nThe Django Gzipping Cache is a transparent wrapper of django caches that\ngzips values before they are sent to the underlying cache.\n\nDjango Gzipping Cache is released under the BSD license, like Django.\nIf you like it, please consider contributing!\n\n===\nUse\n===\n\nThe gzipping cache is declared like so::\n\n CACHES = {\n ...\n 'my_cache': {\n 'BACKEND': 'django_gzipping_cache.cache.GzippingCache',\n 'LOCATION': '_my_cache'\n },\n '_my_cache': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n 'LOCATION': 'snowflake'\n },\n ...\n })\n\nThis will create 2 caches, one is a standard LocMemCache (though GzippingCache\nwill wrap any django cache) and the other is a gzip cache. Here's a sample\niPython run with the above::\n\n In [1]: from django.core.cache import get_cache\n\n In [2]: my_cache = get_cache('my_cache')\n\n In [3]: _my_cache = get_cache('_my_cache')\n\n In [4]: my_cache.set('foo', 'bar')\n\n In [5]: my_cache.get('foo')\n Out[5]: 'bar'\n\n In [6]: _my_cache.get('foo')\n Out[6]: 'x\\x9cKJ,\\x02\\x00\\x02]\\x016'\n\nObviously, you should not use the GzippingCache for small strings as gzip output\ncan be longer.\n\n=============\nConfiguration\n=============\n\nGzippingCache takes 2 additional parameters, the default configuration is::\n\n CACHES = {\n ...\n 'my_cache': {\n 'BACKEND': 'django_gzipping_cache.cache.GzippingCache',\n 'LOCATION': '_my_cache'\n 'COMPRESS_LEVEL': 6,\n 'PASS_UNCOMPRESSED': False,\n },\n ...\n })\n\nCOMPRESS_LEVEL is the number from 1-9 that tells zlib how aggressively to compress,\nhigher numbers take more CPU in order to achieve smaller output.\n\nPASS_UNCOMPRESSED is for storing compressed and uncompressed data in the same\nunderlying cache. This is not recommended. If PASS_UNCOMPRESSED is set to True and\na piece of data fails a CRC check, the data will be returned. If the data was corrupted\nthis will most likely result in your application misbehaving.", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/django-gzipping-cache", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mapmyfitness/django-gzipping-cache", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-gzipping-cache", "package_url": "https://pypi.org/project/django-gzipping-cache/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-gzipping-cache/", "project_urls": { "Download": "https://pypi.python.org/pypi/django-gzipping-cache", "Homepage": "https://github.com/mapmyfitness/django-gzipping-cache" }, "release_url": "https://pypi.org/project/django-gzipping-cache/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "A wrapper for django caches that gzips cached values", "version": "0.1.0" }, "last_serial": 1008136, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b124d264b6d8209aa0abbe751c54c895", "sha256": "9bbf8a5abaa97481b80f08369a9dd36894d943501782538440d31cc8d429a77f" }, "downloads": -1, "filename": "django-gzipping-cache-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b124d264b6d8209aa0abbe751c54c895", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6673, "upload_time": "2014-02-21T23:11:56", "url": "https://files.pythonhosted.org/packages/6e/21/e2d01a3eb2020949b576dabc50c8b6f1c990e442b635370708a5e69ebce6/django-gzipping-cache-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b124d264b6d8209aa0abbe751c54c895", "sha256": "9bbf8a5abaa97481b80f08369a9dd36894d943501782538440d31cc8d429a77f" }, "downloads": -1, "filename": "django-gzipping-cache-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b124d264b6d8209aa0abbe751c54c895", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6673, "upload_time": "2014-02-21T23:11:56", "url": "https://files.pythonhosted.org/packages/6e/21/e2d01a3eb2020949b576dabc50c8b6f1c990e442b635370708a5e69ebce6/django-gzipping-cache-0.1.0.tar.gz" } ] }