{"id":16736252,"url":"https://github.com/flexdinesh/cache-busting-example","last_synced_at":"2025-03-17T01:31:48.388Z","repository":{"id":51759655,"uuid":"181285647","full_name":"flexdinesh/cache-busting-example","owner":"flexdinesh","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-10T06:13:33.000Z","size":1890,"stargazers_count":107,"open_issues_count":15,"forks_count":54,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T16:21:36.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexdinesh.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":"2019-04-14T09:20:58.000Z","updated_at":"2024-10-24T00:59:20.000Z","dependencies_parsed_at":"2022-08-22T18:20:15.010Z","dependency_job_id":null,"html_url":"https://github.com/flexdinesh/cache-busting-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexdinesh%2Fcache-busting-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexdinesh%2Fcache-busting-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexdinesh%2Fcache-busting-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexdinesh%2Fcache-busting-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexdinesh","download_url":"https://codeload.github.com/flexdinesh/cache-busting-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836015,"owners_count":20355615,"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-13T00:08:49.795Z","updated_at":"2025-03-17T01:31:47.869Z","avatar_url":"https://github.com/flexdinesh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cache Busting a React App\n\nAs great as caching is — cache invalidation has been a struggle for a long time now.\n\nThere are different approaches that work for different types of websites. I recently had to invalidate the cache of a web app every time a new version has been released. After trying out a few approaches, I settled with an approach that has proven to work every single time.\n\n## Concept\n\n- We want the site to load from the cache if there is no new version\n- We want to refresh the cache every time a new version of the app is deployed\n- We use npm package versioning to version our app and each deploy will be versioned incrementally\n- We generate a `meta.json` file along with every build in the public dir and it will act as a REST endpoint (won't be cached in browser)\n- We refresh cache (`window.location.reload(true)`) in the browser whenever a new version is released\n\n## License\n\nCopyright (c) 2019 Dineshkumar Pandiyan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexdinesh%2Fcache-busting-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexdinesh%2Fcache-busting-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexdinesh%2Fcache-busting-example/lists"}