Skip to content

Commit 1a2d6d3

Browse files
authored
Merge pull request #2074 from jaimergp/bust-cache
Add a dummy query parameter to the RSS feed URL to bypass the cache
2 parents 6eaf385 + c40412e commit 1a2d6d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Packages/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ const Packages = () => {
8080
};
8181
const fetchLatestData = async () => {
8282
try {
83+
// Fetch the RSS feed from conda-forge. We add a cache-busting query parameter
84+
// to ensure we always get the latest data. Otherwise, the data gets stuck in time.
8385
const response = await fetch(
84-
"https://conda.anaconda.org/conda-forge/rss.xml"
86+
`https://conda.anaconda.org/conda-forge/rss.xml?bustcache=${Date.now()}`
8587
);
8688
// parse the RSS feed into an XML document
8789
const xml = await response.text();

0 commit comments

Comments
 (0)