{"id":34005543,"url":"https://github.com/al3x5dev/laravel-psr16-cache","last_synced_at":"2026-04-02T01:04:20.097Z","repository":{"id":316357281,"uuid":"1063026016","full_name":"al3x5dev/laravel-psr16-cache","owner":"al3x5dev","description":"PSR-16 Simple Cache implementation for Laravel projects","archived":false,"fork":false,"pushed_at":"2025-12-03T15:22:13.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T17:17:00.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/al3x5dev.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T04:19:54.000Z","updated_at":"2025-12-03T15:22:17.000Z","dependencies_parsed_at":"2025-09-25T22:31:46.385Z","dependency_job_id":null,"html_url":"https://github.com/al3x5dev/laravel-psr16-cache","commit_stats":null,"previous_names":["al3x5dev/laravel-psr16-cache"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/al3x5dev/laravel-psr16-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3x5dev%2Flaravel-psr16-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3x5dev%2Flaravel-psr16-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3x5dev%2Flaravel-psr16-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3x5dev%2Flaravel-psr16-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al3x5dev","download_url":"https://codeload.github.com/al3x5dev/laravel-psr16-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3x5dev%2Flaravel-psr16-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"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":[],"created_at":"2025-12-13T10:54:41.556Z","updated_at":"2026-04-02T01:04:20.089Z","avatar_url":"https://github.com/al3x5dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel PSR-16 Cache\n\nA simple and elegant implementation of the PSR-16 standard for Laravel, allowing you to use Redis, Memcached, File, and all Laravel cache drivers with a standardized interface.\n\n---\n\n## 📦 Install\n\n```bash\ncomposer require al3x5/laravel-psr16-cache\n```\n\n## 🚀 Quick Use\n\n```php\nuse Al3x5\\LaravelPsr16Cache;\n\n$cache = new LaravelPsr16Cache();\n\n// Save data\n$cache-\u003eset('user:1', ['name' =\u003e 'Juan'], 3600);\n\n// Get data\n$user = $cache-\u003eget('user:1', 'default_value');\n\n// Check\nif ($cache-\u003ehas('user:1')) {\n    // Do something\n}\n\n// Remove\n$cache-\u003edelete('user:1');\n```\n\n## 💡 Features\n\n- ✅ **Full PSR-16 Implementation**\n- ✅ **Support for all Laravel cache drivers** (Redis, Memcached, File, Database, etc.)\n- ✅ **Automatic Configuration** via Laravel\n- ✅ **Simple and Standardized Interface**\n- ✅ **Ideal for Libraries and Packages** that require PSR-16\n\n## 🔧 Configuration\n\nThe library automatically uses your Laravel project's cache configuration (`config/cache.php`). Simply configure your preferred cache drivers:\n\n```php\n// .env\nCACHE_DRIVER=redis\n# or\nCACHE_DRIVER=memcached\n# or\nCACHE_DRIVER=file\n```\n\n## 📚 Available Methods\n\n```php\n$cache-\u003eget($key, $default = null);\n$cache-\u003eset($key, $value, $ttl = null);\n$cache-\u003edelete($key);\n$cache-\u003eclear();\n$cache-\u003egetMultiple($keys, $default = null);\n$cache-\u003esetMultiple($values, $ttl = null);\n$cache-\u003edeleteMultiple($keys);\n$cache-\u003ehas($key);\n```\n\n## 🔄 Usage with Dependency Injection\n\n```php\nuse Psr\\SimpleCache\\CacheInterface;\n\nclass UserService \n{\n    public function __construct(private CacheInterface $cache) {}\n    \n    public function findUser($id)\n    {\n        return $this-\u003ecache-\u003eget(\"user:{$id}\", function() use ($id) {\n            return User::find($id);\n        });\n    }\n}\n```\n\n## 📋 Requirements\n\n- PHP 8.2 or higher\n- Laravel 12.x\n- Redis or Memcached extension (optional, depending on the driver)\n\n## 🔗 Related\n\n**For PHP projects without Laravel:**\n👉 [mk4u/cache](https://github.com/al3x5dev/cache) - Simple implementation with APCu, File, and other drivers.\n\n## 📄 License\n\nMIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3x5dev%2Flaravel-psr16-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal3x5dev%2Flaravel-psr16-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3x5dev%2Flaravel-psr16-cache/lists"}