{ "info": { "author": "ubershmekel", "author_email": "ubershmekel@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "filecache\n\nfilecache is a decorator which saves the return value of functions even\nafter the interpreter dies. For example this is useful on functions that download\nand parse webpages. All you need to do is specify how long\nthe return values should be cached (use seconds, like time.sleep).\n\nUSAGE:\n\n from filecache import filecache\n \n @filecache(24 * 60 * 60)\n def time_consuming_function(args):\n # etc\n \n @filecache(filecache.YEAR)\n def another_function(args):\n # etc\n\n\nNOTE: All arguments of the decorated function and the return value need to be\n picklable for this to work.\n\nNOTE: The cache isn't automatically cleaned, it is only overwritten. If your\n function can receive many different arguments that rarely repeat, your\n cache may forever grow. One day I might add a feature that once in every\n 100 calls scans the db for outdated stuff and erases.\n\nNOTE: This is less useful on methods of a class because the instance (self)\n is cached, and if the instance isn't the same, the cache isn't used. This\n makes sense because class methods are affected by changes in whatever\n is attached to self.\n\nTested on python 2.7 and 3.1\n\nLicense: BSD, do what you wish with this. Could be awesome to hear if you found\nit useful and/or you have suggestions. ubershmekel at gmail\n\n\nA trick to invalidate a single value:\n\n @filecache.filecache\n def somefunc(x, y, z):\n return x * y * z\n \n del somefunc._db[filecache._args_key(somefunc, (1,2,3), {})]\n # or just iterate of somefunc._db (it's a shelve, like a dict) to find the right key.", "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/ubershmekel/filecache", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "filecache", "package_url": "https://pypi.org/project/filecache/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/filecache/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ubershmekel/filecache" }, "release_url": "https://pypi.org/project/filecache/0.77/", "requires_dist": null, "requires_python": null, "summary": "Persistent caching decorator", "version": "0.77" }, "last_serial": 1692500, "releases": { "0.61": [], "0.62": [ { "comment_text": "", "digests": { "md5": "ff69f2db717812cdc8e11904e114f7f9", "sha256": "4c437d19b94a56e723215d669f9680686b9d3780fca0eca4ba04ae16c0681884" }, "downloads": -1, "filename": "filecache-0.62.zip", "has_sig": false, "md5_digest": "ff69f2db717812cdc8e11904e114f7f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4404, "upload_time": "2011-02-11T16:45:08", "url": "https://files.pythonhosted.org/packages/ab/33/349efd309c177b6c39620fec78d90d84557b7bf147c7eedf8caabcc6b5ba/filecache-0.62.zip" } ], "0.63": [ { "comment_text": "", "digests": { "md5": "452e0e9f510071d8cf05808f5f567e2f", "sha256": "b06affc073aa4187ada9d240d76c238fc0afd53210581513eb98d8f4f2db85e4" }, "downloads": -1, "filename": "filecache-0.63.zip", "has_sig": false, "md5_digest": "452e0e9f510071d8cf05808f5f567e2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6749, "upload_time": "2011-02-13T22:46:06", "url": "https://files.pythonhosted.org/packages/16/c3/f36caf2c66db2e5825a33377216a21fd70ee6734c9401e82556b917a8817/filecache-0.63.zip" } ], "0.64": [ { "comment_text": "built for Windows-7", "digests": { "md5": "14d678787a626fc09a705402285d51d3", "sha256": "40c3ecf833e9e5e523b0c40843e2a39e3c2bdce45426a8731608ddeb9c3fc03c" }, "downloads": -1, "filename": "filecache-0.64.win32.zip", "has_sig": false, "md5_digest": "14d678787a626fc09a705402285d51d3", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 8581, "upload_time": "2011-02-13T22:57:14", "url": "https://files.pythonhosted.org/packages/78/a3/c2f9dfefb9e55160f7e2ff8391ee225da2df6c1a4466bffa21266b330db3/filecache-0.64.win32.zip" }, { "comment_text": "", "digests": { "md5": "6817cc1a96aa29a03c4d3cb949ded43a", "sha256": "4fd0d4d5899059cbadf4fded6d52430534f4c83b5d314f579da5cf0454f28cd5" }, "downloads": -1, "filename": "filecache-0.64.zip", "has_sig": false, "md5_digest": "6817cc1a96aa29a03c4d3cb949ded43a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6715, "upload_time": "2011-02-13T22:57:08", "url": "https://files.pythonhosted.org/packages/27/71/90921b5d442db4c1215d13be309d60fd95f0aa1da5d8c2a31761ec50d4b4/filecache-0.64.zip" } ], "0.65": [ { "comment_text": "", "digests": { "md5": "8db03bb7293ba4e78c04148adcef2e90", "sha256": "0c7edca1ca00e098dce83fae1d0c373c266bd7d30dba838df74ac37399db42a4" }, "downloads": -1, "filename": "filecache-0.65.zip", "has_sig": false, "md5_digest": "8db03bb7293ba4e78c04148adcef2e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6715, "upload_time": "2011-02-13T23:13:32", "url": "https://files.pythonhosted.org/packages/6f/3b/a9de3a24c2e5f24699f940cccd6422810585ba5324f2e09d4df48fc4bf99/filecache-0.65.zip" } ], "0.66": [ { "comment_text": "", "digests": { "md5": "44d0147de53a58b6ba304a8afaa2400b", "sha256": "a43a763fb41c2b37f3b135a60655cb764b9ff6dea844770453337aecda576641" }, "downloads": -1, "filename": "filecache-0.66.zip", "has_sig": false, "md5_digest": "44d0147de53a58b6ba304a8afaa2400b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4434, "upload_time": "2011-06-12T21:29:08", "url": "https://files.pythonhosted.org/packages/5a/63/327e692c3f9f1d6b83562b2c386ac986d341df01ee0fdbe1243995e0c6a4/filecache-0.66.zip" } ], "0.67": [ { "comment_text": "", "digests": { "md5": "fb54991b44b55880c70edf6a79797062", "sha256": "9dd7b07ae8147bfee306fad53a0f0075e9cfbb2a9ad633b4e74f90a85cfc8274" }, "downloads": -1, "filename": "filecache-0.67.zip", "has_sig": false, "md5_digest": "fb54991b44b55880c70edf6a79797062", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3594, "upload_time": "2011-06-13T08:22:25", "url": "https://files.pythonhosted.org/packages/88/ac/a0c6d366cf9bfabe4a0e9cb7492a108523b9d0793aae4340dd86b4e66806/filecache-0.67.zip" } ], "0.69": [ { "comment_text": "", "digests": { "md5": "cf08a32451ec191d6ea68b4854407f07", "sha256": "17ec0d7bdb68f059e97b393a6290d962613217f7d106e977efe38c1958c4ab62" }, "downloads": -1, "filename": "filecache-0.69.zip", "has_sig": false, "md5_digest": "cf08a32451ec191d6ea68b4854407f07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3668, "upload_time": "2011-07-15T10:20:31", "url": "https://files.pythonhosted.org/packages/6b/ee/ab4889f722993f61d88fee3d07cd424ed7b28245e00be5b3a9aa45e12ddf/filecache-0.69.zip" } ], "0.71": [ { "comment_text": "", "digests": { "md5": "91b61af60817552e2fcef7a618915a6c", "sha256": "c0dc018802b068d6de8bed02ab6168c5efa6aaa4f21e9cf973817b66a1f82d57" }, "downloads": -1, "filename": "filecache-0.71.zip", "has_sig": false, "md5_digest": "91b61af60817552e2fcef7a618915a6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7975, "upload_time": "2011-08-06T16:16:34", "url": "https://files.pythonhosted.org/packages/84/6d/800872430fc7c889e743c4e5f6983d0ba9029c5218dcdea3aae30b6d21e6/filecache-0.71.zip" } ], "0.75": [ { "comment_text": "", "digests": { "md5": "78522459fd2dad9b863d25c03296f040", "sha256": "7fe3f00a7b2790eb7df51ce97133ceb941d691ab866109db533f9ac7160d4332" }, "downloads": -1, "filename": "filecache-0.75.zip", "has_sig": false, "md5_digest": "78522459fd2dad9b863d25c03296f040", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8910, "upload_time": "2012-03-18T12:06:14", "url": "https://files.pythonhosted.org/packages/59/cc/801fb50889e0efb5a8aad8073076ea5d9be03ff51d1647e5fbfc79119e60/filecache-0.75.zip" } ], "0.77": [ { "comment_text": "", "digests": { "md5": "0c569770acd3ade2f9e6dda693f2233c", "sha256": "2067bb7f6e292f3a84508b48e4c0f3bbb39bc12562aa1165dc423812f370d7ed" }, "downloads": -1, "filename": "filecache-0.77.zip", "has_sig": false, "md5_digest": "0c569770acd3ade2f9e6dda693f2233c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9018, "upload_time": "2015-08-25T06:57:53", "url": "https://files.pythonhosted.org/packages/4b/d0/4e40b7bb23d04073994d47071bc3f06811ba66dd2de3a41bdea86e8e0cf6/filecache-0.77.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c569770acd3ade2f9e6dda693f2233c", "sha256": "2067bb7f6e292f3a84508b48e4c0f3bbb39bc12562aa1165dc423812f370d7ed" }, "downloads": -1, "filename": "filecache-0.77.zip", "has_sig": false, "md5_digest": "0c569770acd3ade2f9e6dda693f2233c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9018, "upload_time": "2015-08-25T06:57:53", "url": "https://files.pythonhosted.org/packages/4b/d0/4e40b7bb23d04073994d47071bc3f06811ba66dd2de3a41bdea86e8e0cf6/filecache-0.77.zip" } ] }