{"id":20103140,"url":"https://github.com/dotkernel/dot-cache","last_synced_at":"2025-05-06T08:31:08.630Z","repository":{"id":16235164,"uuid":"79600857","full_name":"dotkernel/dot-cache","owner":"dotkernel","description":"DotKernel cache component based on zend-cache, extending and customizing it","archived":false,"fork":false,"pushed_at":"2025-02-28T06:11:04.000Z","size":122,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"4.0","last_synced_at":"2025-03-23T12:51:15.644Z","etag":null,"topics":["independent"],"latest_commit_sha":null,"homepage":"https://docs.dotkernel.org/dot-cache/","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/dotkernel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-20T21:35:40.000Z","updated_at":"2025-02-28T06:08:14.000Z","dependencies_parsed_at":"2024-05-03T18:45:09.479Z","dependency_job_id":"b9779aa7-5834-4d03-b0e3-0898be311ee4","html_url":"https://github.com/dotkernel/dot-cache","commit_stats":{"total_commits":13,"total_committers":5,"mean_commits":2.6,"dds":0.3846153846153846,"last_synced_commit":"1a4df8f85ba1e8113bc2b01eb991293c37c96d7f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotkernel","download_url":"https://codeload.github.com/dotkernel/dot-cache/tar.gz/refs/heads/4.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251419988,"owners_count":21586526,"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":["independent"],"created_at":"2024-11-13T17:34:25.349Z","updated_at":"2025-05-06T08:31:08.621Z","avatar_url":"https://github.com/dotkernel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dot-cache\n\nDotkernel cache component based on symfony-cache.\n\n\u003e dot-cache is a wrapper on top of [symfony/cache](https://github.com/symfony/cache)\n\n## Documentation\n\nDocumentation is available at: https://docs.dotkernel.org/dot-cache/.\n\n## Badges\n\n![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-cache)\n![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-cache/4.3.0)\n\n[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-cache)](https://github.com/dotkernel/dot-cache/issues)\n[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-cache)](https://github.com/dotkernel/dot-cache/network)\n[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-cache)](https://github.com/dotkernel/dot-cache/stargazers)\n[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-cache)](https://github.com/dotkernel/dot-cache/blob/4.0/LICENSE.md)\n\n[![Build Static](https://github.com/dotkernel/dot-cache/actions/workflows/continuous-integration.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-cache/actions/workflows/continuous-integration.yml)\n[![codecov](https://codecov.io/gh/dotkernel/dot-cache/graph/badge.svg?token=FAN1MXKKS9)](https://codecov.io/gh/dotkernel/dot-cache)\n[![PHPStan](https://github.com/dotkernel/dot-cache/actions/workflows/static-analysis.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-cache/actions/workflows/static-analysis.yml)\n\n\u003e This package supports only `array` and `filesystem` adapters, you can use multiple adapters at once.\n\n## Installation\n\nRun the following command in your project directory\n\n```shell\ncomposer require dotkernel/dot-cache\n```\n\nAfter installing, add the `Dot\\Cache\\ConfigProvider::class` class to your configuration aggregate.\n\n## Configuration for Doctrine in_array\n\nIn `config\\autoload\\doctrine.global.php` you need to add the following configurations:\n\nUnder the `doctrine.configuration.orm_default` key add the following config:\n\n```php\n'result_cache'       =\u003e 'array',\n'metadata_cache'     =\u003e 'array',\n'query_cache'        =\u003e 'array',\n'hydration_cache'    =\u003e 'array',\n'second_level_cache' =\u003e [\n    'enabled'                    =\u003e true,\n    'default_lifetime'           =\u003e 3600,\n    'default_lock_lifetime'      =\u003e 60,\n    'file_lock_region_directory' =\u003e '',\n    'regions'                    =\u003e [],\n],\n```\n\nNext, under the `doctrine` key add the following config:\n\n```php\n'cache' =\u003e [\n    'array' =\u003e [\n        'class' =\u003e \\Dot\\Cache\\Adapter\\ArrayAdapter::class,\n    ],\n],\n```\n\n\u003e The above configuration will use an in-memory cache, because you use the `array` adapter.\n\nIf you want to store the cache into files on your local disk you will need to use the `filesystem` adapter.\n\n## Configuration for Doctrine cache using filesystem\n\n**The `filesystem` adapter needs some extra configurations:**\n\n* directory (folder path)\n* namespace (directory name)\n\n```php\n'cache' =\u003e [\n    'array' =\u003e [\n        'class'     =\u003e \\Dot\\Cache\\Adapter\\ArrayAdapter::class,\n    ],\n    'filesystem' =\u003e [\n        'class'     =\u003e \\Dot\\Cache\\Adapter\\FilesystemAdapter::class,\n        'directory' =\u003e getcwd() . '/data/cache',\n        'namespace' =\u003e 'doctrine',\n    ],\n],\n```\n\nYou can store `result_cache`, `metadata_cache`, `query_cache`, `hydration_cache` into files using the `filesystem` adapter, or you can store the `result_cache` into memory using the `array` adapter.\n\n## Configuration example for both in-memory and filesystem adapters\n\nConfiguration sample for `config\\autoload\\doctrine.global.php` file:\n\n```php\nreturn [\n    'dependencies'        =\u003e [\n        'factories' =\u003e [\n            \\Dot\\Cache\\Adapter\\FilesystemAdapter::class =\u003e \\Dot\\Cache\\Factory\\FilesystemAdapterFactory::class,\n        'aliases'   =\u003e [\n            \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter::class =\u003e \\Dot\\Cache\\Adapter\\FilesystemAdapter::class\n        ],\n    ],\n    'doctrine'            =\u003e [\n        'configuration' =\u003e [\n            'orm_default' =\u003e [\n                'result_cache'       =\u003e 'array',\n                'metadata_cache'     =\u003e 'array',\n                'query_cache'        =\u003e 'filesystem',\n                'hydration_cache'    =\u003e 'array',\n                'second_level_cache' =\u003e [\n                    'enabled'                    =\u003e true,\n                    'default_lifetime'           =\u003e 3600,\n                    'default_lock_lifetime'      =\u003e 60,\n                    'file_lock_region_directory' =\u003e '',\n                    'regions'                    =\u003e [],\n                ],\n            ],\n        ],\n        'cache'      =\u003e [\n            'array' =\u003e [\n                'class'     =\u003e \\Symfony\\Component\\Cache\\Adapter\\ArrayAdapter::class,\n            ],\n            'filesystem' =\u003e [\n                'class'     =\u003e \\Dot\\Cache\\Adapter\\FilesystemAdapter::class,\n                'directory' =\u003e getcwd() . '/data/cache',\n                'namespace' =\u003e 'doctrine',\n            ],\n        ],\n    ],\n];\n```\n\n\u003e The above configuration is just a sample, it should not be used as it is.\n\nYou can enable/disable the caching system using the `doctrine.configuration.orm_default.second_level_cache.enabled` key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotkernel%2Fdot-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-cache/lists"}