{"id":17957555,"url":"https://github.com/itinance/doctrine-cache-adapter-with-site-context","last_synced_at":"2025-04-03T17:32:19.060Z","repository":{"id":56994260,"uuid":"42372985","full_name":"itinance/doctrine-cache-adapter-with-site-context","owner":"itinance","description":"CacheAdapter as a bridge between TwigCacheBundle and WhiteLabelBundle ","archived":false,"fork":false,"pushed_at":"2017-04-03T20:48:01.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T11:29:33.094Z","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/itinance.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":"2015-09-12T21:02:42.000Z","updated_at":"2021-04-09T08:02:34.000Z","dependencies_parsed_at":"2022-08-21T13:50:28.102Z","dependency_job_id":null,"html_url":"https://github.com/itinance/doctrine-cache-adapter-with-site-context","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-cache-adapter-with-site-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-cache-adapter-with-site-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-cache-adapter-with-site-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-cache-adapter-with-site-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinance","download_url":"https://codeload.github.com/itinance/doctrine-cache-adapter-with-site-context/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247046746,"owners_count":20874714,"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-10-29T10:55:36.596Z","updated_at":"2025-04-03T17:32:19.013Z","avatar_url":"https://github.com/itinance.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DoctrineCacheAdapterWithSiteContext\n\nIf you are using Emanuele Minottos [TwigCacheBundle](https://github.com/EmanueleMinotto/TwigCacheBundle) and\nSimon Ochos white-label-bundle (https://github.com/simonoche/white-label-bundle), you will get trouble with\nthe cache.\n\nThis class is a replacement for the Cache Adapter used in TwigCacheBundle, to respect the current site context\nin a white-label / multi-site environment.\n\n## Installation:\n\nInstallation using composer:\n\n```\n    \"repositories\": [\n        {\n            \"type\": \"git\",\n            \"url\": \"git@github.com:itinance/DoctrineCacheAdapterWithSiteContext.git\"\n        }\n    ],\n    \"require\": {\n        \"itinance/DoctrineCacheAdapterWithSiteContext\": \"dev-master\"\n    },\n```\n\n\n## Configuration\n\nin app/config/services.yml add the following\n\n```\n    twig_cache.adapter:\n        class: itinance\\DoctrineCacheAdapterWithSiteContext\n        arguments:\n            - @cache_service\n            - @site_context\n```\n\n@cache_service could be configured like this:\n\n```\n    memcached:\n        class: Memcached\n        calls:\n            - [ addServers, [ %memcached.servers% ] ]\n\n    cache_service:\n        class: Doctrine\\Common\\Cache\\MemcachedCache\n        calls:\n            - [ setMemcached, [ @memcached ] ]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fdoctrine-cache-adapter-with-site-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinance%2Fdoctrine-cache-adapter-with-site-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fdoctrine-cache-adapter-with-site-context/lists"}