{"id":16893167,"url":"https://github.com/gruns/iscacheable","last_synced_at":"2025-04-11T13:24:23.066Z","repository":{"id":62571766,"uuid":"335869590","full_name":"gruns/IsCacheable","owner":"gruns","description":"A simple tool to determine if a URL is cacheable or not.","archived":false,"fork":false,"pushed_at":"2021-02-20T22:53:04.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T19:11:51.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gruns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-04T07:08:42.000Z","updated_at":"2022-10-16T15:57:36.000Z","dependencies_parsed_at":"2022-11-03T18:26:10.207Z","dependency_job_id":null,"html_url":"https://github.com/gruns/IsCacheable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruns%2FIsCacheable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruns%2FIsCacheable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruns%2FIsCacheable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruns%2FIsCacheable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gruns","download_url":"https://codeload.github.com/gruns/IsCacheable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235607127,"owners_count":19017298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T17:13:53.582Z","updated_at":"2025-01-25T16:54:04.215Z","avatar_url":"https://github.com/gruns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IsCacheable\n\niscacheable is simple tool to determine if a URL is cacheable or not. It\nboth prints whether the URL is cacheable to stdout and exits with 0 if\nthe URL is cacheable or 1 if it's not cacheable.\n\nOnce installed, `iscacheable` is available as a command.\n\n\n### Usage\n\nTo use, provide `iscacheable` the URL to test and let it go to\nwork. `iscacheable` will then:\n\n  1. Send an HTTP `HEAD` request to the URL.\n  2. Fetch the response headers.\n  3. Determine if the response headers are cacheable.\n  4. Print `Cacheable.` if the URL is cacheable, `Not cacheable.` otherwise.\n  5. Exit with exit code 0 if URL is cacheable, 1 otherwise.\n\nExample:\n\n```\n$ iscacheable https://www.google.com\nNot cacheable.\n$ echo $?\n1\n\n$ iscacheable https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png\nCacheable.\n$ echo $?\n0\n```\n\nOf course iscacheable can also be used programmatically, too.\n\n```python\n\u003e\u003e\u003e from iscacheable import determineCacheability\n\u003e\u003e\u003e\n\u003e\u003e\u003e determineCacheability('https://www.google.com')\nFalse\n\u003e\u003e\u003e determineCacheability('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png')\nTrue\n```\n\nThat's it. Simple.\n\n\n### Installation\n\nInstalling iscacheable with pip is easy.\n\n```\n$ pip install iscacheable\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruns%2Fiscacheable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgruns%2Fiscacheable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruns%2Fiscacheable/lists"}