{ "info": { "author": "Arno Veenstra", "author_email": "arnoveenstra@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Introduction\n\nThis is a Python LRU cache implementation with TTL support, this way you can ensure you will not get results older than the specified TTL.\n\n# Installation\n\npip install lru-ttl\n\n# How to use\n\n```python\n>>> from lruttl import LRUCache\n>>> cache = LRUCache(10)\n>>> cache.set('key1', ['some object'], 5)\n>>> cache['key1']\n['some object']\n>>> # wait a couple of seconds\n>>> cache['key1']\n\n```\n\n```python\n>>> cache = LRUCache(2)\n>>> cache.set('key1', 'val1')\n>>> cache.set('key2', 'val2')\n>>> cache.set('key3', 'val3')\n>>> 'key1' in cache\nFalse\n>>> 'key2' in cache\nTrue\n>>> 'key3' in cache\nTrue\n```\n\nThe TTL does **not** have precedence, so the last recently used keys will be evicted first!\n\n\n```python\n>>> cache = LRUCache(2)\n>>> cache.set('key1', 'val1')\n>>> cache.set('key2', 'val2', 10000)\n>>> cache.set('key3', 'val3')\n>>> 'key1' in cache\nFalse\n>>> 'key2' in cache\nTrue\n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arnov/lru-ttl", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lru-ttl", "package_url": "https://pypi.org/project/lru-ttl/", "platform": "", "project_url": "https://pypi.org/project/lru-ttl/", "project_urls": { "Homepage": "https://github.com/arnov/lru-ttl" }, "release_url": "https://pypi.org/project/lru-ttl/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "A least recently used (LRU) cache implementation with time to live (TTL)", "version": "0.0.7" }, "last_serial": 4794940, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a3bb974a86f87a3cbeee8373fe6c74f7", "sha256": "756b2b89d8c1b4e58e8af0cf9beabad307624660d3c2ec409de76aa8f04ef37f" }, "downloads": -1, "filename": "lru-ttl-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a3bb974a86f87a3cbeee8373fe6c74f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1535, "upload_time": "2017-04-26T09:08:09", "url": "https://files.pythonhosted.org/packages/37/f3/8995c7c30172138f9ee0617830c838f661c71c77b7e33f67ad178d023c6f/lru-ttl-0.0.1.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d0292edca24643f2879f9c2ae435fda9", "sha256": "afcedb845033fbf907d1567d35e1fb6a4098e9b2c790345f9c38dc71fff60837" }, "downloads": -1, "filename": "lru_ttl-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "d0292edca24643f2879f9c2ae435fda9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3278, "upload_time": "2019-02-08T10:01:06", "url": "https://files.pythonhosted.org/packages/d9/3d/006ffab89329289477832d4d5fcba1e6f41b5444ebfe6f0a8e06dae4e316/lru_ttl-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "012203bdfe231a267034de63a4d7cbea", "sha256": "4a96174f1409ec42dedb8d8d1cc1e5c8cd74fdec6712e60e3c3b1a078a4ffc47" }, "downloads": -1, "filename": "lru-ttl-0.0.6.tar.gz", "has_sig": false, "md5_digest": "012203bdfe231a267034de63a4d7cbea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2104, "upload_time": "2018-05-01T09:32:38", "url": "https://files.pythonhosted.org/packages/cb/91/0f895c702bd73b257eac2b157a82e309e57afbf7322f3bddf9baaf3b278c/lru-ttl-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "23ba65d4270431e7dad6c609a17096d2", "sha256": "36a53ab5adeb3a3bcac7aaa8e19dbd40464b3b62dc8820eb73c6c89baacbcd2b" }, "downloads": -1, "filename": "lru_ttl-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "23ba65d4270431e7dad6c609a17096d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3279, "upload_time": "2019-02-08T10:03:03", "url": "https://files.pythonhosted.org/packages/0e/d8/068be7acf0ce85568bc3d9c44b8412b579e0bc943d2b8ca0cbaf5863233e/lru_ttl-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dae4770258eb2023caf53ac06c2ac4e", "sha256": "8467356458bb4fcf709b12d3c092e5423b4c51206309c26d27d04ab4754c2c13" }, "downloads": -1, "filename": "lru-ttl-0.0.7.tar.gz", "has_sig": false, "md5_digest": "5dae4770258eb2023caf53ac06c2ac4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2111, "upload_time": "2019-02-08T10:03:04", "url": "https://files.pythonhosted.org/packages/24/17/cf89a7106f13af6eb5eb122632f0629090cfd39f2a605229958c0bec62d7/lru-ttl-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "23ba65d4270431e7dad6c609a17096d2", "sha256": "36a53ab5adeb3a3bcac7aaa8e19dbd40464b3b62dc8820eb73c6c89baacbcd2b" }, "downloads": -1, "filename": "lru_ttl-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "23ba65d4270431e7dad6c609a17096d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3279, "upload_time": "2019-02-08T10:03:03", "url": "https://files.pythonhosted.org/packages/0e/d8/068be7acf0ce85568bc3d9c44b8412b579e0bc943d2b8ca0cbaf5863233e/lru_ttl-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dae4770258eb2023caf53ac06c2ac4e", "sha256": "8467356458bb4fcf709b12d3c092e5423b4c51206309c26d27d04ab4754c2c13" }, "downloads": -1, "filename": "lru-ttl-0.0.7.tar.gz", "has_sig": false, "md5_digest": "5dae4770258eb2023caf53ac06c2ac4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2111, "upload_time": "2019-02-08T10:03:04", "url": "https://files.pythonhosted.org/packages/24/17/cf89a7106f13af6eb5eb122632f0629090cfd39f2a605229958c0bec62d7/lru-ttl-0.0.7.tar.gz" } ] }