{"id":17479984,"url":"https://github.com/ilikedata/cloudflare-workers-kv-cache","last_synced_at":"2025-09-22T04:33:15.067Z","repository":{"id":69083038,"uuid":"259883400","full_name":"ilikedata/cloudflare-workers-kv-cache","owner":"ilikedata","description":"Cloudflare workers KV cache","archived":false,"fork":false,"pushed_at":"2020-04-29T09:59:26.000Z","size":20,"stargazers_count":24,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T22:41:38.726Z","etag":null,"topics":["cloudflare","cloudflare-worker","cloudflare-workers","cloudflare-workers-kv","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilikedata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-29T09:35:36.000Z","updated_at":"2024-10-24T07:27:04.000Z","dependencies_parsed_at":"2023-02-23T15:01:04.117Z","dependency_job_id":null,"html_url":"https://github.com/ilikedata/cloudflare-workers-kv-cache","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/ilikedata%2Fcloudflare-workers-kv-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilikedata%2Fcloudflare-workers-kv-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilikedata%2Fcloudflare-workers-kv-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilikedata%2Fcloudflare-workers-kv-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilikedata","download_url":"https://codeload.github.com/ilikedata/cloudflare-workers-kv-cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233824488,"owners_count":18736008,"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":["cloudflare","cloudflare-worker","cloudflare-workers","cloudflare-workers-kv","javascript"],"created_at":"2024-10-18T21:42:01.655Z","updated_at":"2025-09-22T04:33:09.740Z","avatar_url":"https://github.com/ilikedata.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Workers KV Cache\n\nUse Cloudflare workers and KV to reduce trips back to origin.\n\nThis was developed as a simple caching mechanism for a website with more than 50,000 images of varying sizes, total size is approximately 20gb. Despite caching in the CDN there were still many requests which come through to origin due to not being cached in all edge locations.\n\nThe chart below shows bandwidth used before \u0026 after deploying this worker.\n\n![Bandwidth usage](bandwidth.png)\n\n## Installation\n\n- Setup a KV database: `IMAGE_CACHE`\n- Add an environment variable `ORIGIN_URL` which points to your origin server, path will be appended to it eg. https://images.example.com/image/file.jpg will be mapped to ORIGIN_URL/image/file.jpg\n- Deploy: I installed via the web interface though deploying using wrangler is also simple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filikedata%2Fcloudflare-workers-kv-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filikedata%2Fcloudflare-workers-kv-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filikedata%2Fcloudflare-workers-kv-cache/lists"}