{ "info": { "author": "Mike Bayer", "author_email": "mike_mp@zzzcomputing.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "dogpile.core\n============\n\nA \"dogpile\" lock, one which allows a single thread to generate\nan expensive resource while other threads use the \"old\" value, until the\n\"new\" value is ready.\n\nDogpile is basically the locking code extracted from the\nBeaker package, for simple and generic usage.\n\nUsage\n-----\n\nA simple example::\n\n from dogpile.core import Dogpile\n\n # store a reference to a \"resource\", some \n # object that is expensive to create.\n the_resource = [None]\n\n def some_creation_function():\n # create the resource here\n the_resource[0] = create_some_resource()\n\n def use_the_resource():\n # some function that uses\n # the resource. Won't reach\n # here until some_creation_function()\n # has completed at least once.\n the_resource[0].do_something()\n\n # create Dogpile with 3600 second\n # expiry time\n dogpile = Dogpile(3600)\n\n with dogpile.acquire(some_creation_function):\n use_the_resource()\n\nAbove, ``some_creation_function()`` will be called\nwhen ``Dogpile.acquire()`` is first called. The \nremainder of the ``with`` block then proceeds. Concurrent threads which \ncall ``Dogpile.acquire()`` during this initial period\nwill be blocked until ``some_creation_function()`` completes.\n\nOnce the creation function has completed successfully the first time,\nnew calls to ``Dogpile.acquire()`` will call ``some_creation_function()`` \neach time the \"expiretime\" has been reached, allowing only a single\nthread to call the function. Concurrent threads\nwhich call ``Dogpile.acquire()`` during this period will\nfall through, and not be blocked. It is expected that\nthe \"stale\" version of the resource remain available at this\ntime while the new one is generated.\n\ndogpile.core is at the core of the `dogpile.cache `_ package\nwhich provides for a basic cache API and sample backends based on the dogpile concept.\n\nDevelopment Status\n-------------------\n\ndogpile.core has been in use in a small number of production environments for a period of\nmonths, and as of 0.3.2 has entered beta status. No issues have been reported yet with its\ncore synchronization model, and overall the project hasn't seen many changes. \nMost development continues within dogpile.cache.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/zzzeek/dogpile.core", "keywords": "caching", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "dogpile.core", "package_url": "https://pypi.org/project/dogpile.core/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dogpile.core/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/zzzeek/dogpile.core" }, "release_url": "https://pypi.org/project/dogpile.core/0.4.1/", "requires_dist": null, "requires_python": null, "summary": "A 'dogpile' lock, typically used as a component of a larger caching solution", "version": "0.4.1" }, "last_serial": 1029997, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "9dc91c920a3aa7c33458e26168a755e2", "sha256": "ded54782830419aaa5bd0dc559c2c619f082c4b2c51b39aafdc5f857f639817f" }, "downloads": -1, "filename": "dogpile.core-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9dc91c920a3aa7c33458e26168a755e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 101962, "upload_time": "2012-04-15T00:52:01", "url": "https://files.pythonhosted.org/packages/ef/55/860d84dac3101988cf7cb1d636cc768ac223f1690e9626e2b0b92f3767b1/dogpile.core-0.3.0.tar.gz" } ], "0.3.0dev": [], "0.3.1": [ { "comment_text": "", "digests": { "md5": "60d306d26063a7b6b1e5955b84edcb8a", "sha256": "93e4ce15a42f54c0715a1df2b635da4f8d1769df281afe7ae13090fae22a9087" }, "downloads": -1, "filename": "dogpile.core-0.3.1.tar.gz", "has_sig": false, "md5_digest": "60d306d26063a7b6b1e5955b84edcb8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 102037, "upload_time": "2012-04-15T23:22:07", "url": "https://files.pythonhosted.org/packages/66/08/d515337385f0f3c0a68f009872dd39ced7bc025f7f3d96151d89dcc5fefa/dogpile.core-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "ec45137d187bb3687c57faef4c95634f", "sha256": "6ffaaf35c03bd1dcf2bc0eefc3869b9e100e99e26b98a04cb9a474cea5662607" }, "downloads": -1, "filename": "dogpile.core-0.3.2.tar.gz", "has_sig": false, "md5_digest": "ec45137d187bb3687c57faef4c95634f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 101957, "upload_time": "2012-06-13T21:22:19", "url": "https://files.pythonhosted.org/packages/1d/ed/c723cebc5479f59c57611908159de4fff5842c1ad725ca511825b55cd5a1/dogpile.core-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "b686a3307b920fd6a279c69b5d69bdac", "sha256": "f91931c1fcff6e5b5c6c2f744832c5cbc59cde3d7ba42d6dda0d10b01a439f2f" }, "downloads": -1, "filename": "dogpile.core-0.3.3.tar.gz", "has_sig": false, "md5_digest": "b686a3307b920fd6a279c69b5d69bdac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 101987, "upload_time": "2012-09-25T21:31:21", "url": "https://files.pythonhosted.org/packages/eb/9b/61a5ad9e03631348f55a101dbcac3c33cf357d2e7517129a87da6e578327/dogpile.core-0.3.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "4f6414fbdf52e3c23610f76a748a09a8", "sha256": "e8f1f978ec1cd5f5ac568fcfed6625ef1fff08f0a1c028a326b47c6b465016e1" }, "downloads": -1, "filename": "dogpile.core-0.4.0.tar.gz", "has_sig": false, "md5_digest": "4f6414fbdf52e3c23610f76a748a09a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 94382, "upload_time": "2012-10-30T15:12:16", "url": "https://files.pythonhosted.org/packages/f8/46/06fa9471f8b0212605a2d49d40604686f9cdff6991001c2ddff7c547b095/dogpile.core-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "01cb19f52bba3e95c9b560f39341f045", "sha256": "be652fb11a8eaf66f7e5c94d418d2eaa60a2fe81dae500f3743a863cc9dbed76" }, "downloads": -1, "filename": "dogpile.core-0.4.1.tar.gz", "has_sig": true, "md5_digest": "01cb19f52bba3e95c9b560f39341f045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 99587, "upload_time": "2013-11-15T22:32:43", "url": "https://files.pythonhosted.org/packages/0e/77/e72abc04c22aedf874301861e5c1e761231c288b5de369c18be8f4b5c9bb/dogpile.core-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "01cb19f52bba3e95c9b560f39341f045", "sha256": "be652fb11a8eaf66f7e5c94d418d2eaa60a2fe81dae500f3743a863cc9dbed76" }, "downloads": -1, "filename": "dogpile.core-0.4.1.tar.gz", "has_sig": true, "md5_digest": "01cb19f52bba3e95c9b560f39341f045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 99587, "upload_time": "2013-11-15T22:32:43", "url": "https://files.pythonhosted.org/packages/0e/77/e72abc04c22aedf874301861e5c1e761231c288b5de369c18be8f4b5c9bb/dogpile.core-0.4.1.tar.gz" } ] }