{ "info": { "author": "o3o3o", "author_email": "o3o3o.me@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Cache Fn\n\nUse django cache to cache the `function(*arg, **kw)` with timeout.\n\n## Quick start\n\n1. Install::\n\n``` \n pip install django-cache-fn\n```\n\n1. Start to use it in code\n\n```\n from cache_fn.decorators import cache_fn\n\n @cache_fn(prefix='myprefix', timeout=3600)\n def foo(k1, k2):\n return \"%s %s\"%(k1, k2)\n```\n\n## Usage\n\n```\ndef cache_fn(timeout=1, prefix=None, cache_ttl=MEMCACHE_MAX_EXPIRATION):\n \"\"\"\n Retrieve data from cache if cacheable and no-stale,\n otherise refresh synchronously and cache it.\n * timeout: The stale timeout which would be handled in the decorator.\n * prefix: The prefix of cache key.\n * cache_ttl: The TTL(time to live) of key in memcache.\n NOTE: For HttpResponse, we just cache the response whose status code is 200.\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/o3o3o/django-cache-fn", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "django-cache-fn", "package_url": "https://pypi.org/project/django-cache-fn/", "platform": "", "project_url": "https://pypi.org/project/django-cache-fn/", "project_urls": { "Homepage": "https://github.com/o3o3o/django-cache-fn" }, "release_url": "https://pypi.org/project/django-cache-fn/1.1/", "requires_dist": null, "requires_python": "", "summary": "Cache function result with args for Django.", "version": "1.1" }, "last_serial": 5460219, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "a9c334d4f6000ac826005aebece65076", "sha256": "e700a159334bd0d2cddf372e83e51a94c08926330fa7e83fb1cbb38f7c0f73f0" }, "downloads": -1, "filename": "django-cache-fn-1.0.tar.gz", "has_sig": false, "md5_digest": "a9c334d4f6000ac826005aebece65076", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3772, "upload_time": "2019-01-26T03:35:27", "url": "https://files.pythonhosted.org/packages/4f/12/a95d66e9799d6b8444ba1d826a0a54bed2145bf5f0bf2dc7ff5f6a181f44/django-cache-fn-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "7cc1b0e04982130e330d7cc4275991e9", "sha256": "0c4fec03c9f660cb5500b23840bf122eb0c6f6fd6987af2e7c30f34ab6ffa36a" }, "downloads": -1, "filename": "django_cache_fn-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7cc1b0e04982130e330d7cc4275991e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4714, "upload_time": "2019-06-28T06:13:49", "url": "https://files.pythonhosted.org/packages/36/19/9469cd363747f06e5befaaa3add0b4637cf2729d3f61c813364d852513f0/django_cache_fn-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3074c6c89e8fea32075d6ca81fead4d3", "sha256": "b8c42f83611dcbfc94c5aa7813e46eb346893458e318a9c1dbc7e29889284f99" }, "downloads": -1, "filename": "django-cache-fn-1.1.tar.gz", "has_sig": false, "md5_digest": "3074c6c89e8fea32075d6ca81fead4d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3758, "upload_time": "2019-06-28T06:13:51", "url": "https://files.pythonhosted.org/packages/30/9e/f4212d4590d91cd65e186ddf67feca1736d0e6b98058ced4422dc7e10442/django-cache-fn-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cc1b0e04982130e330d7cc4275991e9", "sha256": "0c4fec03c9f660cb5500b23840bf122eb0c6f6fd6987af2e7c30f34ab6ffa36a" }, "downloads": -1, "filename": "django_cache_fn-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7cc1b0e04982130e330d7cc4275991e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4714, "upload_time": "2019-06-28T06:13:49", "url": "https://files.pythonhosted.org/packages/36/19/9469cd363747f06e5befaaa3add0b4637cf2729d3f61c813364d852513f0/django_cache_fn-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3074c6c89e8fea32075d6ca81fead4d3", "sha256": "b8c42f83611dcbfc94c5aa7813e46eb346893458e318a9c1dbc7e29889284f99" }, "downloads": -1, "filename": "django-cache-fn-1.1.tar.gz", "has_sig": false, "md5_digest": "3074c6c89e8fea32075d6ca81fead4d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3758, "upload_time": "2019-06-28T06:13:51", "url": "https://files.pythonhosted.org/packages/30/9e/f4212d4590d91cd65e186ddf67feca1736d0e6b98058ced4422dc7e10442/django-cache-fn-1.1.tar.gz" } ] }