{"id":31847314,"url":"https://github.com/opencontentcoop/ocfoshttpcache","last_synced_at":"2025-10-12T09:43:27.403Z","repository":{"id":57032171,"uuid":"188536154","full_name":"OpencontentCoop/ocfoshttpcache","owner":"OpencontentCoop","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-15T11:58:31.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-08T21:34:41.904Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpencontentCoop.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-05-25T07:42:04.000Z","updated_at":"2021-01-15T11:58:33.000Z","dependencies_parsed_at":"2022-08-23T18:50:44.933Z","dependency_job_id":null,"html_url":"https://github.com/OpencontentCoop/ocfoshttpcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpencontentCoop/ocfoshttpcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpencontentCoop%2Focfoshttpcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpencontentCoop%2Focfoshttpcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpencontentCoop%2Focfoshttpcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpencontentCoop%2Focfoshttpcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpencontentCoop","download_url":"https://codeload.github.com/OpencontentCoop/ocfoshttpcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpencontentCoop%2Focfoshttpcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010944,"owners_count":26084837,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-12T09:43:23.378Z","updated_at":"2025-10-12T09:43:27.390Z","avatar_url":"https://github.com/OpencontentCoop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenContent FosHttpCache for eZPublish Legacy\n\nL'estensione integra la libreria [FosHttpCache](https://foshttpcache.readthedocs.io/en/latest/index.html) in eZ Publish 4.x (Legacy)\n\nIl principale vantaggio è la possibilità di cacheare pagine in base allo User Context utilizzando [il metodo\nusato da FosHttpCache](https://foshttpcache.readthedocs.io/en/latest/user-context.html)\n\n## Installazione\n\n - Configurare Varnish (vedi doc/default.vcl)\n \n - Impostare in `site.ini` i `HTTPHeaderSettings`, ad esempio:\n ``` \n [HTTPHeaderSettings]\n CustomHeader=enabled\n OnlyForAnonymous=disabled\n OnlyForContent=enabled\n Cache-Control[]\n Cache-Control[/]=public, must-revalidate, max-age=259200, s-maxage=259200\n HeaderList[]=Vary\n Vary[/]=X-User-Context-Hash\n ```\n \n - Installare e configurare l'estensione\n \n - Rigenerare gli autoloads e svuotare cache degli ini\n \n\n## Configurazione\n\nConfigurare l'endpont Varnish e la porta oppure gli ip in `site.ini`:\n``` \n[VarnishSettings]\nVarnishHostName=varnish.example.com\nVarnishPort=80\nVarnishServers[]=10.0.0.1:1234\nVarnishServers[]=127.0.0.1:80\n```\noppure usando un `[Event]Listeners[]=ocfoshttpcache/varnish_server@MyVarnishServerCallable`\n\n\nE' possibile configurare l'estensione perché utilizzi la `StaticCache` (configurazione di default) in `site.ini`:\n\n```\n[ContentSettings]\nStaticCache=enabled\nStaticCacheHandler=Opencontent\\FosHttpCache\\StaticCache\n```  \n\n\n## Invalidamento della cache di Varnish\n\nPer l'invalidamento della cache è previsto un header custom `X-Instance` configurabile in `site.ini`\n```\n[HTTPHeaderSettings]\nHeaderList[]=X-Instance\nX-Instance[/]=example\n```\noppure usando un `[Event]Listeners[]=ocfoshttpcache/instance_identifier@MyIdentifierCallable`\n\nE' consigliato impostare l'header anche a livello di VirtualHost in modo da taggare anche gli asset e le immagini.\n \n## Note\n\nL'handler di `StaticCache` considera i valori di `site.ini [ContentSettings]CacheThreshold` per calcolare se svuotare o meno tutta la cache.\n\nL'accesso al modulo `_fos_user_context_hash` è garantito dal blocco in `site.ini`:\n```\n[RoleSettings]\nPolicyOmitList[]=_fos_user_context_hash \n```\n\nPer invalidare selettivamente la cache di Varnish è disponibile il modulo `varnish/dashboard`\n\n## Todo\n\nSono disponibili operatori di template per inserire tag custom \n```\n{fos_httpcache_tag('mytag')}\n{fos_httpcache_tag(['tag-one', 'tag-two'])} \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencontentcoop%2Focfoshttpcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencontentcoop%2Focfoshttpcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencontentcoop%2Focfoshttpcache/lists"}