{"id":15662309,"url":"https://github.com/wendelladriel/cache-ttl-helper","last_synced_at":"2025-05-05T23:20:31.560Z","repository":{"id":189174809,"uuid":"680206459","full_name":"WendellAdriel/cache-ttl-helper","owner":"WendellAdriel","description":"Helper Enum for handling cache TTLs in a simple, easy and friendly way","archived":false,"fork":false,"pushed_at":"2023-08-18T16:01:06.000Z","size":7,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T12:13:52.656Z","etag":null,"topics":["cache","enum","ttl","ttl-cache"],"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/WendellAdriel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["WendellAdriel"],"custom":["https://www.paypal.me/wendelladriel"]}},"created_at":"2023-08-18T15:47:21.000Z","updated_at":"2023-10-12T13:09:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"5155713c-07af-4e90-bf69-2fac7c8dfb49","html_url":"https://github.com/WendellAdriel/cache-ttl-helper","commit_stats":null,"previous_names":["wendelladriel/cache-ttl-helper"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fcache-ttl-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fcache-ttl-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fcache-ttl-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WendellAdriel%2Fcache-ttl-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WendellAdriel","download_url":"https://codeload.github.com/WendellAdriel/cache-ttl-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590960,"owners_count":21772998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","enum","ttl","ttl-cache"],"created_at":"2024-10-03T13:31:32.300Z","updated_at":"2025-05-05T23:20:31.554Z","avatar_url":"https://github.com/WendellAdriel.png","language":"PHP","funding_links":["https://github.com/sponsors/WendellAdriel","https://www.paypal.me/wendelladriel"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cp\u003e\n        \u003ch1\u003eCache TTL Helper\u003c/h1\u003e\n        Helper Enum for handling cache TTLs in a simple, easy and friendly way\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/WendellAdriel/cache-ttl-helper\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/WendellAdriel/cache-ttl-helper.svg?style=flat-square\" alt=\"Packagist\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/WendellAdriel/cache-ttl-helper\"\u003e\u003cimg src=\"https://img.shields.io/packagist/php-v/WendellAdriel/cache-ttl-helper.svg?style=flat-square\" alt=\"PHP from Packagist\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/WendellAdriel/cache-ttl-helper/actions\"\u003e\u003cimg alt=\"GitHub Workflow Status (main)\" src=\"https://img.shields.io/github/actions/workflow/status/WendellAdriel/cache-ttl-helper/tests.yml?branch=main\u0026label=Tests\"\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\ncomposer require wendelladriel/cache-ttl-helper\n```\n\n## Usage\n\nThis package provides a simple Enum class with some helper methods to handle cache TTLs in a simple, easy and friendly way.\n\nAll methods are static, and they all return the TTL in seconds.\n\n### Methods available\n\n```php\nuse WendellAdriel\\CacheTtlHelper\\CacheTTL;\n\nCacheTTL::second(); // 1s\nCacheTTL::seconds(30); // 30s\n\nCacheTTL::minute(); // 60s\nCacheTTL::minutes(5); // 300s\n\nCacheTTL::hour(); // 3600s\nCacheTTL::hours(2); // 7200s\n\nCacheTTL::day(); // 86400s\nCacheTTL::days(3); // 259200s\n\nCacheTTL::week(); // 604800s\nCacheTTL::weeks(2); // 1209600s\n\nCacheTTL::month(); // 2592000s\nCacheTTL::months(6); // 15552000s\n\nCacheTTL::year(); // 31536000s\nCacheTTL::years(2); // 63072000s\n```\n\n## Credits\n\n- [Wendell Adriel](https://github.com/WendellAdriel)\n- [All Contributors](../../contributors)\n\n## Contributing\n\nCheck the **[Contributing Guide](CONTRIBUTING.md)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendelladriel%2Fcache-ttl-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwendelladriel%2Fcache-ttl-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendelladriel%2Fcache-ttl-helper/lists"}