{ "info": { "author": "Randall Degges", "author_email": "r@rdegges.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "# django-heroku-memcacheify\n\nAutomatic Django memcached configuration on Heroku.\n\n\n![Deploying memcached is easy](https://github.com/rdegges/django-heroku-memcacheify/raw/master/assets/memcacheify.jpg)\n\n\n## Install\n\nTo install ``django-heroku-memcacheify``, simply run\n``pip install django-heroku-memcacheify`` and you'll get the latest version\ninstalled automatically.\n\n**NOTE**: If you'd like to install this locally, you'll need to have the\n``libmemcached-dev`` libraries installed for this to compile properly. On\nDebian and Ubuntu you can install this by running ``sudo aptitude -y install\nlibmemcached-dev``. If you're using a Mac, you can use\n[homebrew](http://mxcl.github.com/homebrew/) and run ``brew install libmemcached``.\n\n\n## Usage\n\nModify your Django ``settings.py`` file, and set:\n\n``` python\nfrom memcacheify import memcacheify\n\nCACHES = memcacheify()\n```\n\nNext, edit your ``requirements.txt`` file (which Heroku reads) and add\n``pylibmc==1.2.3`` to the bottom of the file. This is required for Heroku to\ndetect the necessary C dependencies and 'bootstrap' your application. This requirement\nhas to be in the root ``requirements.txt`` file, not in any imported requirements.\n([Solution from Stack Overflow](http://stackoverflow.com/questions/11507639/memcached-on-heroku-w-django-cant-install-pylibmc-memcacheify/11587142#11587142))\n\nAssuming you have a memcache server available to your application on Heroku, it\nwill instantly be available. If you have no memcache addon provisioned for your\napp, ``memcacheify`` will default to using local memory caching as a backup :)\n\n\n## Heroku Setup\n\nNow that you've got Django configured to use memcache, all you need to do is\ninstall one memcache addons that Heroku provides!\n\nI personally recommend [MemCachier](https://addons.heroku.com/memcachier) --\nthey're stable, cheap, great!\n\nLet's say I want to install the ``memcachier`` addon, I could simply run:\n\n``` bash\n$ heroku addons:add memcachier:25\n$ heroku config\n...\nMEMCACHIER_SERVERS => memcachier1.example.net\nMEMCACHIER_USERNAME => bobslob\nMEMCACHIER_PASSWORD => l0nGr4ndoMstr1Ngo5strang3CHaR4cteRS\n...\n```\n\nThe example above will provision a *free* 25m memcache server for your\napplication. Assuming everything worked, ``heroku config``'s output should show\nthat you now have 3 new environment variables set.\n\n\n## Local Development\nIf you have a memcached server locally for development that doesn't support\nauthentication, you can still use memcache by setting an environment variable\n`MEMCACHEIFY_USE_LOCAL=True`.\n\nThis will set the default cache to `django_pylibmc.memcached.PyLibMCCache`\n\nIf there are no environment variables for memcache or memcacheify, the default\ncache will be local memory `django.core.cache.backends.locmem.LocMemCache`.\n\n\n## Testing Your Cache\n\nIf you don't trust me, and want to make sure your caching is working as\nexpected, you may do the following:\n\n``` bash\n$ heroku run python manage.py shell\nRunning python manage.py shell attached to terminal... up, run.1\nPython 2.7.2 (default, Oct 31 2011, 16:22:04)\n[GCC 4.4.3] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n(InteractiveConsole)\n>>> from django.core.cache import cache\n>>> cache.set('memcache', 'ify!')\nTrue\n>>> cache.get('memcache')\n'ify!'\n>>>\n```\n\nAssuming everything is working, you should be able to set and retrieve cache\nkeys.\n\n\n## References\n\nIf you're confused, you should probably read:\n\n- [Heroku's Getting Started Guide](http://devcenter.heroku.com/articles/django)\n- [Heroku's memcachier Addon Documentation](https://devcenter.heroku.com/articles/memcachier)\n\n\n## Tests\n\n[![Build Status](https://secure.travis-ci.org/rdegges/django-heroku-memcacheify.png?branch=master)](http://travis-ci.org/rdegges/django-heroku-memcacheify)\n\nWant to run the tests? No problem:\n\n``` bash\n$ git clone git://github.com/rdegges/django-heroku-memcacheify.git\n$ cd django-heroku-memcacheify\n$ python setup.py develop\n...\n$ pip install -r requirements.txt # Install test dependencies.\n$ nosetests\n.............\n----------------------------------------------------------------------\nRan 13 tests in 0.166s\n\nOK\n```\n\n\n## Changelog\n\nv1.0.0: 01-04-2016\n\n - Update django-pylibmc dependency to >=0.6.1.\n - Officially support Python 3.5.\n - Stop testing on Python 2.6.\n\nv0.8: 11-12-2014\n\n - Adding support for memcachedcloud!\n\nv0.7: 9-22-2014\n\n - Upgrading dependencies (again)!\n\nv0.6: 9-20-2014\n\n - Upgrading dependencies.\n\nv0.5: 12-31-2013\n\n - Making the timeout option configurable.\n - Removing Python 2.5 support.\n - Adding an option to use memcached locally without SASL.\n - Updating the README, explaining how to use memcached locally.\n\nv0.4: 12-5-2012\n\n - Update which allows memcachier users to support multiple servers >:)\n Thanks @alexlod!\n\nv0.3: 6-27-2012\n\n - Fixing broken memcachier support.\n\nv0.2: 5-22-2012\n\n - Adding support for memcachier Heroku addon.\n - Updating documentation.\n - Refactoring implementation for clarity.\n - Adding better tests.\n\nv0.1: 5-2-2012\n\n - Initial release!", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rdegges/django-heroku-memcacheify", "keywords": "django heroku cloud cache memcache memcached awesome epic", "license": "UNLICENSE", "maintainer": "", "maintainer_email": "", "name": "django-heroku-memcacheify", "package_url": "https://pypi.org/project/django-heroku-memcacheify/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-heroku-memcacheify/", "project_urls": { "Homepage": "https://github.com/rdegges/django-heroku-memcacheify" }, "release_url": "https://pypi.org/project/django-heroku-memcacheify/1.0.0/", "requires_dist": [ "django-pylibmc (>=0.6.1)" ], "requires_python": "", "summary": "Automatic Django memcached configuration on Heroku.", "version": "1.0.0" }, "last_serial": 1887837, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3e9f868b8de9851dce42f707385594bb", "sha256": "5d4804cee7e02129868c7b858c03ba6612713fce8565ee9026fcb96026ba0ff1" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.1.tar.gz", "has_sig": false, "md5_digest": "3e9f868b8de9851dce42f707385594bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36524, "upload_time": "2012-05-02T06:20:31", "url": "https://files.pythonhosted.org/packages/8d/a3/6683ae5963d9c9102c405b0e6ad83db2e4806c21efdfd357d3d726d7fe27/django-heroku-memcacheify-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "028bcfe27d24623d34c066b53d19ce86", "sha256": "1423b353f19df8665782005419b109f9c34944c00b27f501e0d012b8f64f74e9" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.2.tar.gz", "has_sig": false, "md5_digest": "028bcfe27d24623d34c066b53d19ce86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37636, "upload_time": "2012-05-23T07:16:11", "url": "https://files.pythonhosted.org/packages/90/46/a92df0f50945459ad0a982f5a9eea65f8b6a8d31f020a20a55362b72f964/django-heroku-memcacheify-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "31c62680854bcc427b5f43814af2547d", "sha256": "16611a6e0af90bda62582eff855969bb52abbe43fb0c9423fcfb9a4a9fa7b55a" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.3.tar.gz", "has_sig": false, "md5_digest": "31c62680854bcc427b5f43814af2547d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37698, "upload_time": "2012-06-28T08:25:46", "url": "https://files.pythonhosted.org/packages/18/be/ff9d89c85ea8a01481cd453762020938e4a30a9dd7f7d023f04e0a047bb1/django-heroku-memcacheify-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2b034e01995615d58fb7a449ed86f9ba", "sha256": "e1eeef321e58c19c0ea9485008313ad1c245b7e68e20e739142373ead02080f0" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.4.tar.gz", "has_sig": false, "md5_digest": "2b034e01995615d58fb7a449ed86f9ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38202, "upload_time": "2012-12-06T05:29:26", "url": "https://files.pythonhosted.org/packages/16/00/ef647fe759077bf9234adac85d90524513ec3dc207c9b5461424583c9829/django-heroku-memcacheify-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "083b6069d2ed53341bb3516361915d5a", "sha256": "c8f34069fb68bab9fc9653d0ead3ea9994e91f9ea245d0ba295066a5546bcda8" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.5.tar.gz", "has_sig": false, "md5_digest": "083b6069d2ed53341bb3516361915d5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39337, "upload_time": "2014-01-13T01:51:24", "url": "https://files.pythonhosted.org/packages/b9/63/396cf08d104fa6a34a7a84df9104a678cfd0bd247afa7a599ba08c0a2e2c/django-heroku-memcacheify-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "3e4f254f76973f01a5b7c64693ec0793", "sha256": "2c02d13aa6ec6f8a1f306265c2e3905c54472af02bdd9e274228e2b054b0d4f4" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.6.tar.gz", "has_sig": false, "md5_digest": "3e4f254f76973f01a5b7c64693ec0793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38482, "upload_time": "2014-09-21T00:41:41", "url": "https://files.pythonhosted.org/packages/79/16/9ed1c497d81e8064ed4ceeccbf3cfb522751a7d76794c2058366eb225cd0/django-heroku-memcacheify-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "6d2c2b0a4e4fc0ac33e9a6f68e5c6650", "sha256": "29321a8f864af8763fdc4d7efcf8b0b3e410349bdac30fb3a95b4e681392c0ba" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.7.tar.gz", "has_sig": false, "md5_digest": "6d2c2b0a4e4fc0ac33e9a6f68e5c6650", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38477, "upload_time": "2014-09-22T17:42:06", "url": "https://files.pythonhosted.org/packages/bd/33/3303c6169bd65cdb34642965adc771cda616fd4f20e0cab33858aebf6bb2/django-heroku-memcacheify-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "729e72966ba7522d79b05161a959943e", "sha256": "57e377a53ce87e556cc06c7e71fb2581b6240e7aeb7e03b5891519eaba8d11ae" }, "downloads": -1, "filename": "django-heroku-memcacheify-0.8.tar.gz", "has_sig": false, "md5_digest": "729e72966ba7522d79b05161a959943e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38692, "upload_time": "2014-11-12T21:19:38", "url": "https://files.pythonhosted.org/packages/09/48/61f8a4ae8954ea9d6964acd7e42f29df74173daee64d70141821d4ef3473/django-heroku-memcacheify-0.8.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "da0c90170e0c45e7c1c0a400f83cb1d0", "sha256": "971c63f9af5bee2884bbfd308457b6675b35b89a33cf42c1c4f0a554c324a563" }, "downloads": -1, "filename": "django_heroku_memcacheify-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "da0c90170e0c45e7c1c0a400f83cb1d0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7613, "upload_time": "2016-01-04T17:36:38", "url": "https://files.pythonhosted.org/packages/6c/1e/ce109e66cadb5c7bceef3b66b7e82435bee25715df15ab312bdc52498a94/django_heroku_memcacheify-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5317b0218dfd76a2858304c738e0dc2", "sha256": "76811edb1521bd22b2bf8147afc47685ec8317adf2f7e5f4feccb975409883a1" }, "downloads": -1, "filename": "django-heroku-memcacheify-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f5317b0218dfd76a2858304c738e0dc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38863, "upload_time": "2016-01-04T17:36:44", "url": "https://files.pythonhosted.org/packages/91/88/c14e3fc9e7f67b165e23f0570781c57c6c27ff78569105ed8ce435a12676/django-heroku-memcacheify-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "da0c90170e0c45e7c1c0a400f83cb1d0", "sha256": "971c63f9af5bee2884bbfd308457b6675b35b89a33cf42c1c4f0a554c324a563" }, "downloads": -1, "filename": "django_heroku_memcacheify-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "da0c90170e0c45e7c1c0a400f83cb1d0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7613, "upload_time": "2016-01-04T17:36:38", "url": "https://files.pythonhosted.org/packages/6c/1e/ce109e66cadb5c7bceef3b66b7e82435bee25715df15ab312bdc52498a94/django_heroku_memcacheify-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5317b0218dfd76a2858304c738e0dc2", "sha256": "76811edb1521bd22b2bf8147afc47685ec8317adf2f7e5f4feccb975409883a1" }, "downloads": -1, "filename": "django-heroku-memcacheify-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f5317b0218dfd76a2858304c738e0dc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38863, "upload_time": "2016-01-04T17:36:44", "url": "https://files.pythonhosted.org/packages/91/88/c14e3fc9e7f67b165e23f0570781c57c6c27ff78569105ed8ce435a12676/django-heroku-memcacheify-1.0.0.tar.gz" } ] }