{"id":26922646,"url":"https://github.com/hectormrc/webcache","last_synced_at":"2026-04-27T18:03:54.681Z","repository":{"id":39589520,"uuid":"286828003","full_name":"HectorMRC/webcache","owner":"HectorMRC","description":"A reverse proxy that caches HTTP responses","archived":false,"fork":false,"pushed_at":"2025-05-07T20:19:02.000Z","size":292,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-03T20:38:01.669Z","etag":null,"topics":["go","redis"],"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/HectorMRC.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-08-11T19:13:07.000Z","updated_at":"2025-02-14T23:19:55.000Z","dependencies_parsed_at":"2025-04-02T00:26:35.682Z","dependency_job_id":"64d506f9-7758-4585-8a15-9dc029d86e74","html_url":"https://github.com/HectorMRC/webcache","commit_stats":null,"previous_names":["hectormrc/webcache","alvidir/webcache"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/HectorMRC/webcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorMRC%2Fwebcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorMRC%2Fwebcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorMRC%2Fwebcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorMRC%2Fwebcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HectorMRC","download_url":"https://codeload.github.com/HectorMRC/webcache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorMRC%2Fwebcache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789228,"owners_count":23209774,"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":["go","redis"],"created_at":"2025-04-02T00:22:55.575Z","updated_at":"2026-04-27T18:03:54.606Z","avatar_url":"https://github.com/HectorMRC.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webcache\n\n[![Go version](https://img.shields.io/badge/Go-go1.18-blue.svg)](https://go.dev/) [![tests](https://github.com/alvidir/webcache/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/alvidir/webcache/actions/workflows/test.yaml)\n[![webcache](https://img.shields.io/github/v/release/alvidir/webcache.svg)](https://github.com/alvidir/webcache)\n\nReverse proxy as an HTTP cache and requests decorator\n\n# About\nWebcache is a reverse proxy that caches http responses in order to provide them rapidly each time a same request is performed. Through its configuration file, webcache allows blocking hosts and methods (responding with _403: Forbidden_ or _405: Method not allowed_ respectively) and lets to specify new headers for all or some specific requests.\n\nBy default, Webcache uses a Redis server as a cache, and has its own configuration structure. However, all of this can be easily customized by just implementing the corresponding interfaces **Config** and **Cache**. \n\n# Configuration\nBy default, the server will expect to find any **.yaml** file in the  `/etc/webcache/` path, or any other defined by `CONFIG_PATH` environment variable. If no config file is found, or none of them follows the structure from the example down below, no request or method will be allowed by the webcache. \n\n``` yaml\nmethods:\n  - name: default   # default methods configuration for all endpoints listed in this file\n    enabled: true   # since non listed methods are disabled by default, enable all them\n    cached: true    # since cache is disabled by default, enable for all methods\n    timeout: 1h     # for how long a cached response is valid (10 minutes by default)\n    headers:        # custom headers for all the endpoints listed in this file\n      X_GLOBAL_HEADER: global_header\n      \n  - name: DELETE\n    enabled: false  # block all DELETE requests (405 - method not allowed)\n  - name: POST\n    enabled: false  # block all POST requests (405 - method not allowed)\n  - name: PUT\n    cached: false   # do not catch any PUT requests\n\nrouter:\n  - endpoints: # afected endpoints for the current configuration (regex)\n      - https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,32}\\/?$\n\n    methods: # overwrite the default methods configuration for the endpoints above\n      - name: default\n        headers: # custom headers for the endpoints above\n          X_A_CUSTOM_HEADER: header_value\n          X_ANOTHER_HEADER: another_value\n      - name: GET\n        headers:\n          X_JUST_IN_GET_HEADER: get_header_value\n```\n\n# Environment variables\n\nThe application requires a set of environment variables that describes how the service must perform. These environment variables are those listed down below:\n\n``` bash\n# Service endpoint and network\nSERVICE_ADDR=:8000\nSERVICE_NETWORK=tcp\n\n# Configuration path \nCONFIG_PATH=.config/\n\n# Redis datasource\nREDIS_DSN=webcache-redis:6379\n\n# In-memory cache configuration \nCACHE_SIZE=1024 # how many entries the local cache can have\nCACHE_TTL=10m # for how long an entry is stored in the local cache\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectormrc%2Fwebcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhectormrc%2Fwebcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectormrc%2Fwebcache/lists"}