{ "info": { "author": "maisano", "author_email": "rickmaisano@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Pyramid", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4" ], "description": "# Pyramid Cachebust\r\nBust cache on static assets via query string params.\r\n\r\n## Installation\r\nVia pip:\r\n\r\n pip install pyramid_cachebust\r\n\r\n## Setup\r\nAdd to your configurator via the `include` method:\r\n\r\n config = Configurator()\r\n config.include('pyramid_cachebust')\r\n config.add_static_view('static', 'myapp:static')\r\n\r\nNow `pyramid.request.Request` has two new methods: `cachebusted_path` and `cachebusted_url`. These methods are wrappers for `request.static_path` and `request.static_url`, with the addition of tagging on cache-busting query parameters:\r\n\r\n request.cachebusted_path('myapp:static/file.css')\r\n >>> '/static/file.css?_=394a82fdd72eed3ac45d113bd8af554e'\r\n\r\n request.cachebusted_url('myapp:static/file.css')\r\n >>> 'http://localhost/static/file.css?_=394a82fdd72eed3ac45d113bd8af554e'\r\n\r\nThe querystring gets generated in one of two ways. The default is an MD5 hexdigest of the file contents. The two alternatives are the file's mtime ('mtime') or the time of app init ('init'). Generation of the hash/lookup of the mtime happens once per asset. Results are cached and served upon resultant calls.\r\n\r\n## Configuration\r\nTo place in your Pyramid `.ini`:\r\n\r\n| name | type | default | description\r\n|-------------------------|---------|-----------|-------------\r\n| cachebust.enabled | bool | true | toggles plugin on/off\r\n| cachebust.reload_files | bool | false | when true, cache is ignored and query param is calculated on every request\r\n| cachebust.method | str | md5 | method of file calculation (md5, mtime or init)\r\n| cachebust.param_key | str | _ | key of query param\r\n\r\n## Contributors\r\nThanks for your contributions:\r\n* Richard Maisano (maisano)\r\n* Marius Gedminas (mgedmin)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/maisano/pyramid_cachebust/tarball/0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maisano/pyramid_cachebust", "keywords": "web wsgi pylons pyramid cachebust", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyramid_cachebust", "package_url": "https://pypi.org/project/pyramid_cachebust/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyramid_cachebust/", "project_urls": { "Download": "https://github.com/maisano/pyramid_cachebust/tarball/0.1.1", "Homepage": "https://github.com/maisano/pyramid_cachebust" }, "release_url": "https://pypi.org/project/pyramid_cachebust/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Nascent cache busting for the Pyramid web framework", "version": "0.1.1" }, "last_serial": 1383881, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b22da1ae63e2f87ac95b57849d27b57f", "sha256": "94409a3afa8cd551b7750c14fcc92f973eefdb21804a3072e598070d512bb116" }, "downloads": -1, "filename": "pyramid_cachebust-0.1.tar.gz", "has_sig": false, "md5_digest": "b22da1ae63e2f87ac95b57849d27b57f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3311, "upload_time": "2013-11-02T01:29:55", "url": "https://files.pythonhosted.org/packages/fa/3e/df677e49dc124427196dd3dca2420c2422c790d39cb2acad253183969615/pyramid_cachebust-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3ed00a3c1910aef1f6c0bb4210093e87", "sha256": "d5db800c138b355c44db7d58b60ee3d3e9f993166506af902cd39e2ae0ed0730" }, "downloads": -1, "filename": "pyramid_cachebust-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ed00a3c1910aef1f6c0bb4210093e87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4238, "upload_time": "2015-01-15T18:31:03", "url": "https://files.pythonhosted.org/packages/1e/1a/5cbdacc473b0579193863cfa3686d94a73319379a86a35498ebd773a711c/pyramid_cachebust-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ed00a3c1910aef1f6c0bb4210093e87", "sha256": "d5db800c138b355c44db7d58b60ee3d3e9f993166506af902cd39e2ae0ed0730" }, "downloads": -1, "filename": "pyramid_cachebust-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ed00a3c1910aef1f6c0bb4210093e87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4238, "upload_time": "2015-01-15T18:31:03", "url": "https://files.pythonhosted.org/packages/1e/1a/5cbdacc473b0579193863cfa3686d94a73319379a86a35498ebd773a711c/pyramid_cachebust-0.1.1.tar.gz" } ] }