{"id":37364189,"url":"https://github.com/zamronypj/zzzmiddleware","last_synced_at":"2026-01-16T04:49:30.307Z","repository":{"id":57002692,"uuid":"128648341","full_name":"zamronypj/zzzmiddleware","owner":"zamronypj","description":"Cache middleware for Slim Framework 3.0","archived":false,"fork":false,"pushed_at":"2018-09-09T23:36:30.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T14:44:48.969Z","etag":null,"topics":["cache-library","php","slim-3","slim-framework","slim-middleware","zzzcache"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zamronypj.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}},"created_at":"2018-04-08T14:15:23.000Z","updated_at":"2018-09-09T23:35:08.000Z","dependencies_parsed_at":"2022-08-21T13:20:54.290Z","dependency_job_id":null,"html_url":"https://github.com/zamronypj/zzzmiddleware","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zamronypj/zzzmiddleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamronypj%2Fzzzmiddleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamronypj%2Fzzzmiddleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamronypj%2Fzzzmiddleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamronypj%2Fzzzmiddleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zamronypj","download_url":"https://codeload.github.com/zamronypj/zzzmiddleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamronypj%2Fzzzmiddleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: 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":["cache-library","php","slim-3","slim-framework","slim-middleware","zzzcache"],"created_at":"2026-01-16T04:49:29.701Z","updated_at":"2026-01-16T04:49:30.290Z","avatar_url":"https://github.com/zamronypj.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zzzmiddleware\nCache middleware for Slim Framework 3.0 using ZzzCache\n\n# Requirement\n- [PHP \u003e= 5.4](https://php.net)\n- [Composer](https://getcomposer.org)\n- [Slim Framework 3.0](https://slimframework.com)\n- [ZzzCache](https://github/zamronypj/zzzcache)\n\n# Installation\nRun through composer\n\n    $ composer require juhara/zzzmiddleware\n\n# How to use\n\n### Register CacheMiddleware to Slim Dependency Container\n\n    \u003c?php\n    ...\n    use Juhara\\ZzzCache\\Contracts\\CacheInterface;\n    use Juhara\\ZzzCache\\Cache;\n    use Juhara\\ZzzCache\\Storages\\File;\n    use Juhara\\ZzzCache\\Helpers\\ExpiryCalculator;\n    use Juhara\\ZzzCache\\Helpers\\Md5Hash;\n\n    $container[CacheInterface::class] = function ($c) {\n        // create a file-based cache where all cache\n        // files is stored in directory name\n        // app/storages/cache with\n        // filename prefixed with string 'cache'\n        return new Cache(\n            new File(\n                new Md5Hash(),\n                'app/storages/cache/',\n                'cache'\n            ),\n            new ExpiryCalculator()\n        );\n    };\n\n    use Juhara\\CacheMiddleware\\CacheMidleware;\n    use Juhara\\CacheMiddleware\\ResponseCacheFactory;\n\n    $container[CacheMiddleware::class] = function ($c) {\n        $cache = $c-\u003eget(CacheInterface::class);\n        $factory = new ResponseCacheFactory();\n        return new CacheMiddleware($cache, $factory);\n    };\n\n### Add CacheMiddleware to Slim Application\n\n    use Slim\\App;\n    use  Juhara\\CacheMiddleware\\CacheMiddleware;\n\n    $app = new App($settings);\n    ...\n    $app-\u003eadd(CacheMiddleware::class);\n\n### Create Proper Configuration\n\nIf using `Juhara\\ZzzCache\\Storages\\File` as storage, then you need to make sure\nthat directory of cache is writeable by web server.\n\n## Example\n\nSee [example application](https://github.com/zamronypj/zzzappexample) to understand\nhow to use CacheMiddleware.\n\n## Contributing\n\nJust create PR if you want to improve it.\n\nThank you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamronypj%2Fzzzmiddleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzamronypj%2Fzzzmiddleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamronypj%2Fzzzmiddleware/lists"}