{"id":19951985,"url":"https://github.com/studio24/http-cache-clear","last_synced_at":"2025-07-24T00:39:54.703Z","repository":{"id":57060581,"uuid":"216023001","full_name":"studio24/http-cache-clear","owner":"studio24","description":"Clear old cache data from the Symfony HTTP Cache (filesystem) based on an expiry time","archived":false,"fork":false,"pushed_at":"2020-01-13T13:34:52.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T18:04:52.066Z","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/studio24.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":"2019-10-18T12:50:04.000Z","updated_at":"2021-01-11T09:19:02.000Z","dependencies_parsed_at":"2022-08-24T14:53:32.789Z","dependency_job_id":null,"html_url":"https://github.com/studio24/http-cache-clear","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Fhttp-cache-clear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Fhttp-cache-clear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Fhttp-cache-clear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Fhttp-cache-clear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/studio24","download_url":"https://codeload.github.com/studio24/http-cache-clear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241381646,"owners_count":19953751,"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":[],"created_at":"2024-11-13T01:11:07.398Z","updated_at":"2025-03-01T15:15:21.532Z","avatar_url":"https://github.com/studio24.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clear the expired items from HTTP Cache on the command line\n\nSymfony's [HTTP Cache](https://symfony.com/doc/current/http_cache.html) is a powerful way to cache entire HTTP responses \nand provide fast, full-page caching for your website or web application.\n\nHowever, due to a [known flaw](https://github.com/symfony/symfony/pull/6855) if you use the default filesystem method to \nstore HTTP Cache files this does not clean up expired cache files, which can fill up a disk drive.\n\nWe created this small tool to help delete the expired cache files from Symfony's HTTP Cache.\n\n## Installation\n\nInstall via [Composer](https://getcomposer.org/):\n\n```\ncomposer require studio24/http-cache-clear\n```\n    \n## Usage\n\nThe default command clears the HTTP Cache of cache files that are 4 hours or older.\n\n```\n./bin/http-cache-clear\n```\n\nBy default the command clears the cache in `var/cache` for the `prod` environment and for all files older than `4` hours. \nYou can change these options on the command line. View help to see how:\n\n```\n./bin/http-cache-clear -h\n```\n\nOne note on the `--path` option. The command appends the environment and `http_cache` folder, so the following command \nactually clears the HTTP cache in `cache/prod/http_cache`. \n\n```\n./bin/http-cache-clear --path=cache\n```\n\nThe default is to clear all files older than 4 hours. You can change this by passing the `expiry` argument.\n\n```\n./bin/http-cache-clear var/cache --expiry=24 \n```\n\n## Tests\n\nRun phpunit:\n\n```\n./vendor/bin/phpunit\n```\n\nRun codesniffer:\n\n```\n./vendor/bin/phpcs\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Credits\n\n- [Maria Beznea](https://www.studio24.net/)\n- [Simon R Jones](https://github.com/simonrjones)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudio24%2Fhttp-cache-clear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudio24%2Fhttp-cache-clear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudio24%2Fhttp-cache-clear/lists"}