{"id":42453247,"url":"https://github.com/peroks/guzzle-file-cache","last_synced_at":"2026-01-28T08:51:54.442Z","repository":{"id":60381284,"uuid":"496674814","full_name":"peroks/guzzle-file-cache","owner":"peroks","description":"A lightweight file cache for Guzzle 7+ implementing the PSR-6 Caching Interface","archived":false,"fork":false,"pushed_at":"2024-12-13T00:00:57.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T05:48:47.056Z","etag":null,"topics":["api-client","cache","caching","file-cache","guzzle","guzzle-handler","lightweight","php","psr-16"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/peroks.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":"2022-05-26T15:32:09.000Z","updated_at":"2022-11-05T16:21:15.000Z","dependencies_parsed_at":"2023-01-29T00:32:05.017Z","dependency_job_id":"7f344e62-61c6-4ea0-9a79-e02d374e3075","html_url":"https://github.com/peroks/guzzle-file-cache","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"656d57dd6178ab8b7c2ea7587238e17dffd79d24"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/peroks/guzzle-file-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroks%2Fguzzle-file-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroks%2Fguzzle-file-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroks%2Fguzzle-file-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroks%2Fguzzle-file-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peroks","download_url":"https://codeload.github.com/peroks/guzzle-file-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peroks%2Fguzzle-file-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28842931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["api-client","cache","caching","file-cache","guzzle","guzzle-handler","lightweight","php","psr-16"],"created_at":"2026-01-28T08:51:53.690Z","updated_at":"2026-01-28T08:51:54.436Z","avatar_url":"https://github.com/peroks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple file caching for the Guzzle http client\n### A lightweight file cache for Guzzle 7+ implementing the PSR-16 Caching Interface\n\n## How to use\n\n    \u003c?php\n    \n    use GuzzleHttp\\Client;\n    use GuzzleHttp\\HandlerStack;\n    use Peroks\\GuzzleFileCache\\Cache;\n    use Peroks\\GuzzleFileCache\\FileStorage;\n    \n    function getGuzzleClient( array $options = [] ): Client {\n        $stack = HandlerStack::create();\n        $store = new FileStorage( 'your/cache/directory' );\n        $cache = new Cache( $store );\n    \n        $stack-\u003epush( $cache );\n        $options['handler'] = $stack;\n    \n        return new Client( $options );\n    }\n\nYou use an instance of the `Peroks\\GuzzleFileCache\\Cache` class to add\nfile-caching as a handler (middleware) to the Guzzle http client.\n\n`Peroks\\GuzzleFileCache\\FileStorage` does the real work, implementing the\n[PSR-16: Common Interface for Caching Libraries](https://www.php-fig.org/psr/psr-16/).\n\nAfter you have added caching to the Guzzle http client, there is a new\noption for caching: `ttl` (time-to-live). The `ttl` value is in seconds.\n\nYou can set this option for each request sent through the client.\nIf you omit this option or set `ttl` to `0`, the request is not cached.\n\n    $response = $client-\u003esend( $request, [ 'ttl' =\u003e 3600 ] ); // 1 hour caching.\n\n## Installing\n\nYou need **composer** to download and install peroks/guzzle-file-cache.\nJust run `composer require peroks/guzzle-file-cache` in your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperoks%2Fguzzle-file-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperoks%2Fguzzle-file-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperoks%2Fguzzle-file-cache/lists"}