{"id":15489476,"url":"https://github.com/openclassrooms/cachebundle","last_synced_at":"2025-06-26T03:35:44.807Z","repository":{"id":16458435,"uuid":"19210423","full_name":"OpenClassrooms/CacheBundle","owner":"OpenClassrooms","description":"Symfony3 Bundle for OpenClassrooms Cache","archived":false,"fork":false,"pushed_at":"2024-08-06T14:13:50.000Z","size":41,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-06-18T07:16:33.049Z","etag":null,"topics":["cache","openclassrooms","php","symfony","symfony-bundle"],"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/OpenClassrooms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2014-04-27T16:54:58.000Z","updated_at":"2024-08-06T13:48:10.000Z","dependencies_parsed_at":"2024-08-06T15:49:49.385Z","dependency_job_id":"0508a356-7514-4134-8620-6c12a0af8d45","html_url":"https://github.com/OpenClassrooms/CacheBundle","commit_stats":{"total_commits":47,"total_committers":6,"mean_commits":7.833333333333333,"dds":0.5957446808510638,"last_synced_commit":"3cc49a0919395922ed78e813d267de9a8b17bf79"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/OpenClassrooms/CacheBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FCacheBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FCacheBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FCacheBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FCacheBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenClassrooms","download_url":"https://codeload.github.com/OpenClassrooms/CacheBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenClassrooms%2FCacheBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261995798,"owners_count":23242204,"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","openclassrooms","php","symfony","symfony-bundle"],"created_at":"2024-10-02T07:06:02.337Z","updated_at":"2025-06-26T03:35:44.785Z","avatar_url":"https://github.com/OpenClassrooms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/OpenClassrooms/CacheBundle.svg?branch=master)](https://travis-ci.org/OpenClassrooms/CacheBundle)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/b04e23bf-8e36-4704-801e-bb29a7719ed3/mini.png)](https://insight.sensiolabs.com/projects/b04e23bf-8e36-4704-801e-bb29a7719ed3)\n[![Coverage Status](https://coveralls.io/repos/OpenClassrooms/CacheBundle/badge.png?branch=master)](https://coveralls.io/r/OpenClassrooms/CacheBundle?branch=master)\n\nCacheBundle adds features to Doctrine Cache implementation\n- Default lifetime\n- Fetch with a namespace\n- Save with a namespace\n- Cache invalidation through namespace strategy\n- CacheProvider Builder\n\nSee [OpenClassrooms/Cache](https://github.com/OpenClassrooms/Cache) for more details.\n\n## Installation\nThis bundle can be installed using composer:\n\n```composer require openclassrooms/cache-bundle```\nor by adding the package to the composer.json file directly.\n\n```json\n{\n    \"require\": {\n        \"openclassrooms/cache-bundle\": \"*\"\n    }\n}\n```\n\nAfter the package has been installed, add the bundle to the AppKernel.php file:\n\n```php\n// in AppKernel::registerBundles()\n$bundles = array(\n    // ...\n    new OpenClassrooms\\Bundle\\CacheBundle\\OpenClassroomsCacheBundle(),\n    // ...\n);\n```\n\n## Configuration\n```yaml\nopen_classrooms_cache:\n    default_lifetime: 10    (optional, default = 0)\n# Providers\n    # array\n    provider: array\n    # redis            \n    provider:\n        redis:\n            host: localhost\n            port: 6379      (optional, default = 6379)\n            timeout: 0.0    (optional, default = 0.0)\n```\n## Usage\nThe configured cache is available as ```openclassrooms.cache.cache``` service:\n```php\n$cache = $container-\u003eget('openclassrooms.cache.cache');\n\n$cache-\u003efetch($id);\n$cache-\u003efetchWithNamespace($id, $namespaceId);\n$cache-\u003esave($id, $data);\n$cache-\u003esaveWithNamespace($id, $data, $namespaceId);\n$cache-\u003einvalidate($namespaceId);\n\n```\n\nThe configured cache provider is available as ```openclassrooms.cache.cache_provider``` service:\n```php\n$cacheProvider = $container-\u003eget('openclassrooms.cache.cache_provider');\n```\n\nThe cache provider builder is available as ```openclassrooms.cache.cache_provider``` service:\n```php\n$builder = $container-\u003eget('openclassrooms.cache.cache_provider_builder');\n\n// Redis\n$cacheProvider = $builder\n    -\u003ecreate(CacheProviderType::REDIS)\n    -\u003ewithHost('127.0.0.1')\n    -\u003ewithPort(6379) // Default 6379\n    -\u003ewithTimeout(0.0) // Default 0.0\n    -\u003ebuild();\n```\n\nSee [OpenClassrooms/Cache](https://github.com/OpenClassrooms/Cache) for more details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclassrooms%2Fcachebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenclassrooms%2Fcachebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclassrooms%2Fcachebundle/lists"}