Skip to content

Commit b68a625

Browse files
committed
Eliminate cache busting
Solid is a REST API, so request URIs are treated as names of resources. A cache breaker bogus query string parameter could be interpreted by a Solid server as a different name. Indeed it was handled thus by ESS, so Pod Spaces requests were failing. This change fixes that issue. In generatl I highly recommend getting the core application working first without the added complexity of caching. Once the core features are stable, you might consider adding caching.
1 parent d9d3cbf commit b68a625

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/lib/hooks/useBrowseStorage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function useBrowseStorage(containerUrl: string | null, refreshKey?: numbe
104104

105105
// Use @inrupt/solid-client to fetch the container dataset
106106
const containerDataset = await getSolidDataset(url, {
107-
fetch: fetchWithCacheBust,
107+
fetch: fetchFn,
108108
});
109109

110110
// Get all contained resource URLs using @inrupt/solid-client
@@ -128,7 +128,7 @@ export function useBrowseStorage(containerUrl: string | null, refreshKey?: numbe
128128
// If refreshKey is provided, fetch .meta files to get updated names after rename/upload
129129
if (refreshKey !== undefined) {
130130
try {
131-
const metaName = await getDisplayNameFromMeta(absoluteUrl, fetchWithCacheBust);
131+
const metaName = await getDisplayNameFromMeta(absoluteUrl, fetchFn);
132132
if (metaName) {
133133
name = metaName;
134134
}
@@ -177,7 +177,7 @@ export function useBrowseStorage(containerUrl: string | null, refreshKey?: numbe
177177
if (!isContainerUrl && !isLikelyFile(absoluteUrl)) {
178178
try {
179179
const itemDataset = await getSolidDataset(absoluteUrl, {
180-
fetch: fetchWithCacheBust,
180+
fetch: fetchFn,
181181
});
182182
finalIsContainer = isContainer(itemDataset);
183183
} catch (e) {

0 commit comments

Comments
 (0)