{"id":17104965,"url":"https://github.com/gilbitron/php-simplecache","last_synced_at":"2025-10-22T02:58:30.605Z","repository":{"id":911260,"uuid":"671252","full_name":"gilbitron/PHP-SimpleCache","owner":"gilbitron","description":"A simple script for caching 3rd party API calls in PHP","archived":false,"fork":false,"pushed_at":"2019-10-14T09:35:25.000Z","size":13,"stargazers_count":262,"open_issues_count":0,"forks_count":47,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-28T15:07:17.097Z","etag":null,"topics":["cache","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/gilbitron/php-simplecache","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gilbitron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["gilbitron"]}},"created_at":"2010-05-17T16:22:42.000Z","updated_at":"2024-09-30T22:43:04.000Z","dependencies_parsed_at":"2022-08-04T19:01:28.800Z","dependency_job_id":null,"html_url":"https://github.com/gilbitron/PHP-SimpleCache","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2FPHP-SimpleCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2FPHP-SimpleCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2FPHP-SimpleCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2FPHP-SimpleCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilbitron","download_url":"https://codeload.github.com/gilbitron/PHP-SimpleCache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208145,"owners_count":20901570,"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","php"],"created_at":"2024-10-14T15:39:33.878Z","updated_at":"2025-10-22T02:58:25.561Z","avatar_url":"https://github.com/gilbitron.png","language":"PHP","funding_links":["https://github.com/sponsors/gilbitron"],"categories":[],"sub_categories":[],"readme":"# PHP SimpleCache\n\nThe PHP SimpleCache Class is an easy way to cache 3rd party API calls.\n\n## Install\n\nInstall via [composer](https://getcomposer.org):\n\n```javascript\n{\n    \"require\": {\n        \"gilbitron/php-simplecache\": \"~1.4\"\n    }\n}\n```\n\nRun `composer install` then use as normal:\n\n```php\nrequire 'vendor/autoload.php';\n$cache = new Gilbitron\\Util\\SimpleCache();\n```\n\n## Usage\n\nA very basic usage example:\n\n```php\n$cache = new Gilbitron\\Util\\SimpleCache();\n$latest_tweet = $cache-\u003eget_data('tweet', 'http://search.twitter.com/search.atom?q=from:gilbitron\u0026rpp=1');\necho $latest_tweet;\n```\n\nA more advanced example:\n\n```php\n$cache = new Gilbitron\\Util\\SimpleCache();\n$cache-\u003ecache_path = 'cache/';\n$cache-\u003ecache_time = 3600;\n\nif($data = $cache-\u003eget_cache('label')){\n\t$data = json_decode($data);\n} else {\n\t$data = $cache-\u003edo_curl('http://some.api.com/file.json');\n\t$cache-\u003eset_cache('label', $data);\n\t$data = json_decode($data);\n}\n\nprint_r($data);\n```\n\n## Credits\n\nPHP SimpleCache was created by [Gilbert Pellegrom](https://gilbitron.me) from [Dev7studios](https://dev7studios.co). Released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbitron%2Fphp-simplecache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilbitron%2Fphp-simplecache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbitron%2Fphp-simplecache/lists"}