{"id":13703057,"url":"https://github.com/globocom/kong-plugin-proxy-cache","last_synced_at":"2025-09-08T09:44:38.698Z","repository":{"id":66161227,"uuid":"149816831","full_name":"globocom/kong-plugin-proxy-cache","owner":"globocom","description":"A Proxy Caching plugin for Kong makes it fast and easy to configure caching of responses and serving of those cached responses in Redis","archived":false,"fork":false,"pushed_at":"2018-11-13T16:46:32.000Z","size":133,"stargazers_count":47,"open_issues_count":4,"forks_count":12,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-05-05T07:40:09.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/globocom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2018-09-21T20:53:28.000Z","updated_at":"2025-03-13T03:19:33.000Z","dependencies_parsed_at":"2023-03-12T11:17:17.276Z","dependency_job_id":null,"html_url":"https://github.com/globocom/kong-plugin-proxy-cache","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/kong-plugin-proxy-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fkong-plugin-proxy-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fkong-plugin-proxy-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fkong-plugin-proxy-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fkong-plugin-proxy-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/kong-plugin-proxy-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fkong-plugin-proxy-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166945,"owners_count":25233959,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-02T21:00:49.681Z","updated_at":"2025-09-08T09:44:38.652Z","avatar_url":"https://github.com/globocom.png","language":"Lua","funding_links":[],"categories":["Response Cache"],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n  kong-plugin-proxy-cache\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    A Proxy Caching plugin for \u003ca href=\"https://konghq.com/\"\u003eKong\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://luarocks.org/modules/sergiojorge/kong-plugin-proxy-cache\"\u003e\u003cimg src=\"https://img.shields.io/luarocks/v/sergiojorge/kong-plugin-proxy-cache.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.globo.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/powered%20by-globo.com-blue.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA Proxy Caching plugin for Kong makes it fast and easy to configure caching of responses and serving of those cached responses in Redis. It caches responses bases on configurable response code and request headers with the request method.\n\nThis Kong plugin adds a non-standard `X-Cache-Status` header. There are several possible values for this header:\n\n* `MISS`: The resource was not found in cache, and the request was proxied upstream.\n* `HIT`: The request was satisfied and served from cache.\n* `BYPASS`: The request could not be satisfied from cache based on plugin settings.\n\n## Getting started\n\nConfigure this plugin on a Service by making the following request:\n\n```shell\n$ curl -X POST http://kong:8001/services/debug-upstream/plugins \\\n    --data \"name=proxy-cache\" \\\n    --data \"config.cache_ttl=300\" \\\n    --data \"config.redis.host=127.0.0.1\"\n```\n\n* **service**: the id or name of the Service that this plugin configuration will target.\n\n## Configuration\n\nHere's a list of all the settings which can be used in this plugin:\n\n\u003e Note: The required fields are in bold.\n\n| Field          | Default       | Description\n|----------------|---------------|----------------------------------------------------\n| **response_code**  | 200, 301, 302 | Upstream response status code considered cacheable\n| vary_headers   |               | Relevant headers considered for the cache key\n| vary_nginx_variables |              | Relevant nginx variables considered for the cache key\n| **cache_ttl**      | 300           | TTL, in seconds, of cache responses\n| cache_control  | true         | Respect the Cache-Control behaviors\n| **redis.host**     |               | Host to use for Redis connection\n| **redis.port**     | 6379          | Port to use for Redis connection\n| **redis.timeout**  | 2000          | Connection timeout to use for Redis connection\n| redis.password |               | Password to use for Redis connection\n| **redis.database** | 0             | Database to use for Redis connection\n| redis.sentinel_master_name  |           | Sentinel master name to use for Redis connection. Defining this value implies using Redis Sentinel\n| redis.sentinel_role         |           | Sentinel role to use for Redis connection\n| redis.sentinel_addresses    |           | Sentinel address to use for Redis connection\n| **redis.max_idle_timeout** | 10000       | maximal idle timeout (in ms) for keep alive the Redis connection\n| **redis.pool_size** | 1000       | maximal pool size by Redis connection\n\n### Cache Control\n\nWhen the `cache_control` is enabled by settings, Kong will respect request and response `Cache-Control` headers as defined by RFC7234, with a few notes:\n\n* The behavior of no-cache is simplified to exclude the entity from being cached entirely.\n* Secondary key calculation via Vary is not yet supported.\n\n## Installing\n\n### From LuaRocks\n\n```shell\n$ luarocks install kong-plugin-proxy-cache\n```\n\n### From GitHub\n\n```shell\n$ sh -c \"git clone https://github.com/globocom/kong-plugin-proxy-cache /tmp/kong-plugin-proxy-cache \u0026\u0026 cd /tmp/kong-plugin-proxy-cache \u0026\u0026 luarocks make *.rockspec\"\n```\n\n## Contributing\n\nPlease, read the contribute guide [CONTRIBUTING](./CONTRIBUTING.md).\n\n## License\n\nkong-plugin-proxy-cache is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fkong-plugin-proxy-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fkong-plugin-proxy-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fkong-plugin-proxy-cache/lists"}