{"id":49880023,"url":"https://github.com/pardnio/php-cache-fallback","last_synced_at":"2026-05-15T13:40:38.045Z","repository":{"id":275490822,"uuid":"926218230","full_name":"pardnio/php-cache-fallback","owner":"pardnio","description":"PD\\Cache is a hybrid caching system for PHP that combines Redis and filesystem caching with automatic filesystem fallback support.","archived":false,"fork":false,"pushed_at":"2025-02-03T08:29:04.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T17:35:29.310Z","etag":null,"topics":["cache","pardnchiu","php-composer","php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/pardnio.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,"zenodo":null}},"created_at":"2025-02-02T20:27:45.000Z","updated_at":"2026-04-05T18:04:00.000Z","dependencies_parsed_at":"2025-02-02T22:19:10.432Z","dependency_job_id":"19a13161-e2af-439a-b0d9-b842024b7bd7","html_url":"https://github.com/pardnio/php-cache-fallback","commit_stats":null,"previous_names":["pardnchiu/php-cache","pardnio/php-cache","pardnltd-tools/php-cache","pardnio/php-cache-fallback"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pardnio/php-cache-fallback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fphp-cache-fallback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fphp-cache-fallback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fphp-cache-fallback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fphp-cache-fallback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pardnio","download_url":"https://codeload.github.com/pardnio/php-cache-fallback/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fphp-cache-fallback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"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":["cache","pardnchiu","php-composer","php-library"],"created_at":"2026-05-15T13:40:37.797Z","updated_at":"2026-05-15T13:40:38.024Z","avatar_url":"https://github.com/pardnio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PD\\Cache\n\n\u003e PD\\Cache is a hybrid caching system for PHP that combines Redis and filesystem caching with automatic filesystem fallback support.\n\n![tag](https://img.shields.io/badge/tag-PHP%20Library-bb4444)\n![size](https://img.shields.io/github/size/pardnchiu/PHP-Cache/src/Cache.php)\u003cbr\u003e\n![version](https://img.shields.io/packagist/v/pardnchiu/cache)\n![download](https://img.shields.io/packagist/dm/pardnchiu/cache)\n\n## Features\n\n- Hybrid caching strategy (Redis + Filesystem)\n- Automatic fallback to filesystem when Redis is unavailable\n- Built-in HTML / Text content optimization\n- Automatic cache expiration handling\n- Cache cleanup mechanism\n- MD5 key generation for cache entries\n\n## Key Capabilities\n\n- Get/Set cache with automatic storage selection\n- HTML/Text content minification\n- Automatic cache expiration\n- Cache cleanup for expired entries\n- System resilience fallback mechanism\n\n## Dependencies\n\n- `pardnchiu/redis` - For Redis caching support (optional)\n- `/storage/caches` - Write permission on storage directory\n\n## How to Use\n\n### Installation\n\n```shell\ncomposer require pardnchiu/cache\n```\n\n```php\n// Initialize cache with Redis support\n$redis = new PD\\Redis();\n$cache = new PD\\Cache($redis);\n\n// Set cache with 1-hour expiration\n$cache-\u003eset(\"page-key\", $content, 3600);\n\n// Get cached content\n$content = $cache-\u003eget(\"page-key\");\n\n// Clean expired cache entries\n$cache-\u003eclean();\n\n// Initialize cache without Redis (filesystem only)\n$cache = new PD\\Cache();\n```\n\n## License\n\nThis source code project is licensed under the [MIT](https://github.com/pardnchiu/PHP-Cache/blob/main/LICENSE) license.\n\n## Creator\n\n\u003cimg src=\"https://avatars.githubusercontent.com/u/25631760\" align=\"left\" width=\"96\" height=\"96\" style=\"margin-right: 0.5rem;\"\u003e\n\n#### Pardn Chiu\n\n\u003ca href=\"mailto:dev@pardn.io\" target=\"_blank\"\u003e\n \u003cimg src=\"https://pardn.io/image/email.svg\" width=\"48\" height=\"48\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://linkedin.com/in/pardnchiu\" target=\"_blank\"\u003e\n \u003cimg src=\"https://pardn.io/image/linkedin.svg\" width=\"48\" height=\"48\"\u003e\n\u003c/a\u003e\n\n---\n\n©️ 2024 [Pardn Chiu](https://pardn.io)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnio%2Fphp-cache-fallback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpardnio%2Fphp-cache-fallback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnio%2Fphp-cache-fallback/lists"}