{"id":23138341,"url":"https://github.com/alex19pov31/bitrix-redis-cache","last_synced_at":"2026-04-27T17:33:45.416Z","repository":{"id":56944297,"uuid":"176891369","full_name":"alex19pov31/bitrix-redis-cache","owner":"alex19pov31","description":"Пакет для кеширования данных в redis через интерфейс CMS Bitrix","archived":false,"fork":false,"pushed_at":"2019-03-21T09:30:50.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T06:07:55.325Z","etag":null,"topics":["bitrix","cache","php","redis"],"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/alex19pov31.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}},"created_at":"2019-03-21T07:22:48.000Z","updated_at":"2022-09-15T16:02:59.000Z","dependencies_parsed_at":"2022-08-21T07:20:14.250Z","dependency_job_id":null,"html_url":"https://github.com/alex19pov31/bitrix-redis-cache","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alex19pov31/bitrix-redis-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex19pov31%2Fbitrix-redis-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex19pov31%2Fbitrix-redis-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex19pov31%2Fbitrix-redis-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex19pov31%2Fbitrix-redis-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex19pov31","download_url":"https://codeload.github.com/alex19pov31/bitrix-redis-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex19pov31%2Fbitrix-redis-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bitrix","cache","php","redis"],"created_at":"2024-12-17T13:10:41.627Z","updated_at":"2026-04-27T17:33:45.399Z","avatar_url":"https://github.com/alex19pov31.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/alex19pov31/bitrix-redis-cache/v/stable)](https://packagist.org/packages/alex19pov31/bitrix-redis-cache)\n\n# Bitrix Redis cache\n\nКеширование данных посредством Redis.\n\n## Установка\n\n```bash\ncomposer require alex19pov31/bitrix-redis-cache\n```\n\n## Настройка \n\nВ файле **/bitrix/.settings_extra.php** (если его нет, то создать) прописываем настройки:\n\n```php\n\u003c?php\nreturn [\n  'cache' =\u003e [\n    'value' =\u003e [\n      'type' =\u003e [\n          'class_name' =\u003e 'Alex19pov31\\BitrixRedisCache\\RedisCacheEngine',\n        ],\n      'redis' =\u003e [\n        'scheme' =\u003e 'tcp',\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e 6379,\n      ],\n      'sid' =\u003e $_SERVER[\"DOCUMENT_ROOT\"].\"#01\"\n    ],\n  ],\n];\n```\n\nПодробней о параметрах подключения можно прочитать тут - https://github.com/nrk/predis/wiki/Connection-Parameters\n\nАвтолоадер надо подключать в /bitrix/dbconn.php.\n\n## Использование\n\n```php\nuse Bitrix\\Main\\Data\\Cache;\n\n$data = null;\n$ttl = 3600; // кешируем на час\n$key = \"test_key\"; // ключ кеша\n\n$cache = Cache::createInstance();\nif ($cache-\u003einitCache($ttl, $key, 'redis')) {\n    $data = $cache-\u003egetVars();\n    // или если имело место быть кеширование вывода\n    $cache-\u003eoutput();\n} elseif ($cache-\u003estartDataCache($ttl, $key, 'redis', [])) {\n\t$data = 'Тестовые данные';\n\t$cache-\u003eendDataCache($data);\n}\n```\n\n## Принудительное использование (без конфигурационного файла)\n\n```php\nuse Alex19pov31\\BitrixRedisCache\\RedisCacheEngine;\nuse Bitrix\\Main\\Data\\Cache;\n\n$cacheEngine = new RedisCacheEngine([\n\t'scheme' =\u003e 'tcp',\n\t'host' =\u003e '127.0.0.1',\n\t'port' =\u003e 6379,\n]);\n\n$data = null;\n$ttl = 3600; // кешируем на час\n$key = \"test_key\"; // ключ кеша\n\n$cache = new Cache($cacheEngine);\nif ($cache-\u003einitCache($ttl, $key, 'redis')) {\n    $data = $cache-\u003egetVars();\n    // или если имело место быть кеширование вывода\n    $cache-\u003eoutput();\n} elseif ($cache-\u003estartDataCache($ttl, $key, 'redis', [])) {\n\t$data = 'Тестовые данные';\n\t$cache-\u003eendDataCache($data);\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex19pov31%2Fbitrix-redis-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex19pov31%2Fbitrix-redis-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex19pov31%2Fbitrix-redis-cache/lists"}