{"id":22835265,"url":"https://github.com/gueff/cachix","last_synced_at":"2025-06-11T23:03:49.079Z","repository":{"id":62513213,"uuid":"113164129","full_name":"gueff/cachix","owner":"gueff","description":"A simple PHP Caching Class working with files","archived":false,"fork":false,"pushed_at":"2023-04-22T13:45:15.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T00:08:48.638Z","etag":null,"topics":["cache","caching","php"],"latest_commit_sha":null,"homepage":"","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/gueff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-12-05T09:52:31.000Z","updated_at":"2023-05-29T14:15:31.000Z","dependencies_parsed_at":"2025-04-24T00:08:49.908Z","dependency_job_id":"c09e128f-1e6f-4893-8bca-e04ef1fcb846","html_url":"https://github.com/gueff/cachix","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gueff/cachix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gueff%2Fcachix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gueff%2Fcachix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gueff%2Fcachix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gueff%2Fcachix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gueff","download_url":"https://codeload.github.com/gueff/cachix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gueff%2Fcachix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259360794,"owners_count":22845817,"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","caching","php"],"created_at":"2024-12-12T22:08:51.417Z","updated_at":"2025-06-11T23:03:49.058Z","avatar_url":"https://github.com/gueff.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cachix\nA simple PHP Caching Class working with files\n\n## Requirements\n- PHP \u003e= 7.4\n- Linux commands `rm`, `find` and `grep` to be executable via PHP's `shell_exec` command\n\n## Installation\ncreate the composer.json file with following content:\n~~~\n{\n    \"require\": {\n        \"gueff/cachix\":\"1.0.2\"\n    }\n}\n~~~\n\nrun installation\n~~~\n$ composer install\n~~~\n\n## Usage\n\n~~~php\n\u003c?php\n\n// init Config\n\\Cachix::init(array(\n    'bCaching' =\u003e true,\n\t'sCacheDir' =\u003e '/tmp/',\n\t'iDeleteAfterMinutes' =\u003e 10,\n\t'sBinRemove' =\u003e '/bin/rm',\n\t'sBinFind' =\u003e '/usr/bin/find',\n\t'sBinGrep' =\u003e '/bin/grep'\n));\n\n// build a Cache-Key\n$sKey = 'myCacheKey.Token';\n\n// autodelete cachefiles\n// which contain the string \".Token\" in key-names\n\\Cachix::autoDeleteCache('.Token');\n\n// first time saving data to cache...\nif (empty(\\Cachix::getCache($sKey)))\n{\n    // Data to be cached\n    $aData = ['foo' =\u003e 'bar'];\n    \n    \\Cachix::saveCache(\n       \t$sKey,\n     \t$aData\n    );\n}\n// ...or read from existing Cache\nelse\n{\n    $aData = \\Cachix::getCache($sKey);\n}\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgueff%2Fcachix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgueff%2Fcachix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgueff%2Fcachix/lists"}