{"id":19651056,"url":"https://github.com/mnutt/libvmod-cachehits","last_synced_at":"2026-02-28T12:10:25.551Z","repository":{"id":66381895,"uuid":"441762639","full_name":"mnutt/libvmod-cachehits","owner":"mnutt","description":"Varnish vmod for notifying backend of previous cache hit rate for stale objects","archived":false,"fork":false,"pushed_at":"2025-11-11T16:33:13.000Z","size":115,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-11T18:11:25.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"M4","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mnutt.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-25T21:38:30.000Z","updated_at":"2025-03-01T19:50:35.000Z","dependencies_parsed_at":"2024-08-26T23:06:08.672Z","dependency_job_id":null,"html_url":"https://github.com/mnutt/libvmod-cachehits","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mnutt/libvmod-cachehits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Flibvmod-cachehits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Flibvmod-cachehits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Flibvmod-cachehits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Flibvmod-cachehits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnutt","download_url":"https://codeload.github.com/mnutt/libvmod-cachehits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnutt%2Flibvmod-cachehits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29933087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-11T15:05:05.591Z","updated_at":"2026-02-28T12:10:25.543Z","avatar_url":"https://github.com/mnutt.png","language":"M4","funding_links":[],"categories":[],"sub_categories":[],"readme":"============\nvmod-cachehits\n============\n\nSYNOPSIS\n========\n\nimport cachehits;\n\nDESCRIPTION\n===========\n\nVarnish vmod to enable hinting to the backend the number of previous cache hits.\n\nThe intended usage is for the backend to notice that an object has a high cache hit rate and run additional optimizations. (for example, higher png compression level)\n\nFUNCTIONS\n=========\n\nPrototype\n        ::\n\n                count()\nReturn value\n       INT\nDescription\n       Returns number of cache hits for stale object\nCacheHits\n        ::\n\n                set bereq.http.Cache-Hits = cachehits.count();\n\nINSTALLATION\n============\n\nThe source tree is based on autotools to configure the building, and\ndoes also have the necessary bits in place to do functional unit tests\nusing the ``varnishtest`` tool.\n\nBuilding requires the Varnish header files and uses pkg-config to find\nthe necessary paths.\n\nUsage::\n\n ./autogen.sh\n ./configure\n\nIf you have installed Varnish to a non-standard directory, call\n``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to\nthe appropriate path. For instance, when varnishd configure was called\nwith ``--prefix=$PREFIX``, use\n\n::\n\n export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig\n export ACLOCAL_PATH=${PREFIX}/share/aclocal\n\nThe module will inherit its prefix from Varnish, unless you specify a\ndifferent ``--prefix`` when running the ``configure`` script for this\nmodule.\n\nMake targets:\n\n* make - builds the vmod.\n* make install - installs your vmod.\n* make check - runs the unit tests in ``src/tests/*.vtc``.\n* make distcheck - run check and prepare a tarball of the vmod.\n\nIf you build a dist tarball, you don't need any of the autotools or\npkg-config. You can build the module simply by running::\n\n ./configure\n make\n\nInstallation directories\n------------------------\n\nBy default, the vmod ``configure`` script installs the built vmod in the\ndirectory relevant to the prefix. The vmod installation directory can be\noverridden by passing the ``vmoddir`` variable to ``make install``.\n\nUSAGE\n=====\n\nIn your VCL you could then use this vmod along the following lines::\n\n        import cachehits;\n\n        sub vcl_backend_fetch {\n                set bereq.http.Cache-Hits = cachehits.count();\n        }\n\nCOMMON PROBLEMS\n===============\n\n* configure: error: Need varnish.m4 -- see README.rst\n\n  Check whether ``PKG_CONFIG_PATH`` and ``ACLOCAL_PATH`` were set correctly\n  before calling ``autogen.sh`` and ``configure``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnutt%2Flibvmod-cachehits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnutt%2Flibvmod-cachehits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnutt%2Flibvmod-cachehits/lists"}