{ "info": { "author": "Nathaniel Tucker", "author_email": "me@ntucker.me", "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.7" ], "description": "Django-Cache-Magic\n================\n\nCache magic addresses two common scenarios for caching and cache invalidation\nfor django models: *instance caching* and *related objects caching*.\n\nInstance caching: Storing instances of objects in your cache layer\nas well as your database.\n\nRelated objects caching: Storing a collection of objects related to another\nobject referenced by relational constraints (ForeignKey, ManyToMany, etc.)\n\nInstalling\n----------\n pip install -e \"git+https://github.com/ntucker/django-cache-magic#egg=cachemagic\"\n\nUsage\n-----\nTo start autocaching model instances, add a CacheController to your model:\n\n from django.db import models\n from cachemagic import CacheController\n\n class myModel(models.Model):\n f1 = models.IntegerField()\n f2 = models.TextField()\n\n cache = CacheController()\n\n myModel.cache.get(pk=27)\n\nWhen using cachemagic, you should avoid django operations that update multiple\nrows at once, since these operations typically don't emit the signals that\ncachemagic relies on for cache invalidation. This includes methods like\n[`Queryset.update`](https://docs.djangoproject.com/en/1.3/ref/models/querysets/#update),\n[`Queryset.delete`](https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete),\nand\n[`RelatedManager.clear`](https://docs.djangoproject.com/en/1.3/ref/models/relations/#django.db.models.fields.related.RelatedManager.clear)\n\nFind the complete documentation at [django-cache-magic.readthedocs.org](http://django-cache-magic.readthedocs.org/).\n\n\nThanks\n------\nBig thanks to [Travis Fischer](https://github.com/travisfischer) for drafting\na lot of documentation and tests!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ntucker/django-cache-magic", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-cache-magic", "package_url": "https://pypi.org/project/django-cache-magic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-cache-magic/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ntucker/django-cache-magic" }, "release_url": "https://pypi.org/project/django-cache-magic/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Django Cache Magic", "version": "0.1.0" }, "last_serial": 966169, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3259854a653c1c411803c3e5a9b9c9c4", "sha256": "37d794560381b8c6077d88ca31414b1e683c803400b197e0e6e96761f43ce352" }, "downloads": -1, "filename": "django-cache-magic-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3259854a653c1c411803c3e5a9b9c9c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15991, "upload_time": "2014-01-11T18:01:36", "url": "https://files.pythonhosted.org/packages/62/dd/85eab50f5a76930086030bc100ee187ce5e599f69a0a749f0c30019f82f3/django-cache-magic-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3259854a653c1c411803c3e5a9b9c9c4", "sha256": "37d794560381b8c6077d88ca31414b1e683c803400b197e0e6e96761f43ce352" }, "downloads": -1, "filename": "django-cache-magic-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3259854a653c1c411803c3e5a9b9c9c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15991, "upload_time": "2014-01-11T18:01:36", "url": "https://files.pythonhosted.org/packages/62/dd/85eab50f5a76930086030bc100ee187ce5e599f69a0a749f0c30019f82f3/django-cache-magic-0.1.0.tar.gz" } ] }