{"id":23906977,"url":"https://github.com/letsmakecakes/caching-proxy","last_synced_at":"2025-07-20T12:34:11.524Z","repository":{"id":270569150,"uuid":"910777617","full_name":"letsmakecakes/caching-proxy","owner":"letsmakecakes","description":"A lightweight, thread-safe caching proxy server written in Go with zero external dependencies.","archived":false,"fork":false,"pushed_at":"2025-01-01T12:01:56.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T14:16:21.154Z","etag":null,"topics":["cache","caching","cli","cli-app","devtools","go","golang","http","http-cache","http-proxy","http-server","middleware","networking","performance","proxy","proxy-server","reverse-proxy","server","web-cache","web-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/letsmakecakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-01T11:51:51.000Z","updated_at":"2025-01-01T12:03:46.000Z","dependencies_parsed_at":"2025-01-01T13:17:45.145Z","dependency_job_id":"f4328542-5e4e-4d1f-ac64-12d88b649c78","html_url":"https://github.com/letsmakecakes/caching-proxy","commit_stats":null,"previous_names":["letsmakecakes/caching-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/letsmakecakes/caching-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcaching-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcaching-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcaching-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcaching-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsmakecakes","download_url":"https://codeload.github.com/letsmakecakes/caching-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcaching-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266127232,"owners_count":23880421,"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":["cache","caching","cli","cli-app","devtools","go","golang","http","http-cache","http-proxy","http-server","middleware","networking","performance","proxy","proxy-server","reverse-proxy","server","web-cache","web-proxy"],"created_at":"2025-01-05T02:15:47.870Z","updated_at":"2025-07-20T12:34:11.500Z","avatar_url":"https://github.com/letsmakecakes.png","language":"Go","readme":"# Caching Proxy\n\nA lightweight caching proxy server written in Go that caches responses from origin servers. It can be used to reduce load on the origin server and improve response times for repeated requests.\n\n## Features\n\n- Forward requests to origin server\n- Cache responses for subsequent requests\n- Cache hit/miss indicators via headers\n- CLI tool with configuration options\n- Cache clearing functionality\n- Thread-safe implementation\n\n## Installation\n\n### Prerequisites\n\n- Go 1.21 or higher\n- Git\n\n### Building from source\n\n1. Clone the repository\n```bash\ngit clone https://github.com/letsmakecakes/caching-proxy.git\ncd caching-proxy\n```\n\n2. Build the binary\n```bash\ngo build -o caching-proxy cmd/caching-proxy/main.go\n```\n\n## Usage\n\n### Starting the proxy server\n\nThe basic syntax for starting the proxy server is:\n\n```bash\n./caching-proxy --port \u003cport_number\u003e --origin \u003corigin_url\u003e\n```\n\nExample:\n```bash\n./caching-proxy --port 3000 --origin http://dummyjson.com\n```\n\nThis will start the proxy server on port 3000 and forward requests to http://dummyjson.com.\n\n### Command line flags\n\n- `--port`: Port number for the proxy server (default: 3000)\n- `--origin`: Origin server URL (required)\n- `--clear-cache`: Clear the cached responses\n\n### Clearing the cache\n\nTo clear the cache:\n```bash\n./caching-proxy --clear-cache\n```\n\n## Testing\n\n### Manual Testing\n\n1. Start the proxy server:\n```bash\n./caching-proxy --port 3000 --origin http://dummyjson.com\n```\n\n2. Make a request to the proxy server:\n```bash\n# First request (cache miss)\ncurl -v http://localhost:3000/products/1\n\n# Second request (cache hit)\ncurl -v http://localhost:3000/products/1\n```\n\n3. Check the `X-Cache` header in the response:\n- `X-Cache: MISS` indicates the response came from the origin server\n- `X-Cache: HIT` indicates the response came from the cache\n\n## Performance Testing\n\nYou can use Apache Benchmark (ab) to test the performance improvement with caching:\n\n```bash\n# Install Apache Benchmark\n# On Ubuntu/Debian:\nsudo apt-get install apache2-utils\n# On macOS:\nbrew install apache2\n\n# Test without cache (first request)\nab -n 100 -c 10 http://localhost:3000/products/1\n\n# Test with cache (second request)\nab -n 100 -c 10 http://localhost:3000/products/1\n```\n\nCompare the response times between cached and non-cached requests.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fcaching-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsmakecakes%2Fcaching-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fcaching-proxy/lists"}