{"id":37088401,"url":"https://github.com/onsdigital/dp-frontend-cache-helper","last_synced_at":"2026-01-14T10:51:49.738Z","repository":{"id":65695806,"uuid":"596642031","full_name":"ONSdigital/dp-frontend-cache-helper","owner":"ONSdigital","description":"Helps you cache data for dp-renderer in your frontends.  ","archived":false,"fork":false,"pushed_at":"2025-11-24T11:55:09.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-11-28T01:18:57.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ONSdigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-02T16:19:27.000Z","updated_at":"2025-11-24T11:55:13.000Z","dependencies_parsed_at":"2024-06-20T15:44:32.878Z","dependency_job_id":"11f39e2f-2443-4204-946b-fa91e2135ffe","html_url":"https://github.com/ONSdigital/dp-frontend-cache-helper","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"94ca48f6e4846bf20d2a5443d3abb6aa4001b3f0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ONSdigital/dp-frontend-cache-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdp-frontend-cache-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdp-frontend-cache-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdp-frontend-cache-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdp-frontend-cache-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ONSdigital","download_url":"https://codeload.github.com/ONSdigital/dp-frontend-cache-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdp-frontend-cache-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"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":[],"created_at":"2026-01-14T10:51:49.258Z","updated_at":"2026-01-14T10:51:49.734Z","avatar_url":"https://github.com/ONSdigital.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dp-frontend-cache-helper\nHelps you cache data for dp-renderer in your frontends.  \n\nBootstrap example:\n\n```\ncacheHelper \"github.com/ONSdigital/dp-frontend-cache-helper/pkg/navigation/helper\"\n\nnavCache, err := cacheHelper.Init(ctx, cacheHelper.Config{\n\t\tAPIRouterURL:                cfg.APIRouterURL, // API Router URL\n\t\tCacheUpdateInterval:         cfg.CacheUpdateInterval, // 0 means update at startup only.  Time in minutes.\n        EnableNewNavBar:             cfg.EnableNewNavBar, // Used to turn on/off.  \n\t\tEnableCensusTopicSubsection: cfg.EnableCensusTopicSubsection, // Whether to include centus topic subsection.\n\t\tCensusTopicID:               cfg.CensusTopicID, // Navigation is tied to 4445 in sandbox.\n\t\tIsPublishingMode:            cfg.IsPublishingMode, // Whether not we're in the public subnet.\n\t\tLanguages:                   cfg.SupportedLanguages, // Usually []string{\"en\", \"cy\"}; English and Welsh\n\t\tServiceAuthToken:            cfg.ServiceAuthToken, // Service to Service Auth token.  Required for publishing subnet.\n\t})\n\n// Starts the background jobs.\nnavCache.RunUpdates(ctx, svcErrors)  \n```\n\nThen within your handlers:\n\n```\nmappedNavContent, err := navCache.GetMappedNavigationContent(ctx, lang)\nif err != nil \u0026\u0026 navCache.Config.EnableNewNavBar == true {\n    model.NavigationContent = mappedNavContent\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fdp-frontend-cache-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsdigital%2Fdp-frontend-cache-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fdp-frontend-cache-helper/lists"}