Skip to content

Commit

Permalink
feat: disable style cache
Browse files Browse the repository at this point in the history
  • Loading branch information
msimmer committed Sep 6, 2022
1 parent ec9dca1 commit 64546a3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/b-ber-reader-react/src/helpers/XMLAdaptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,20 +352,20 @@ class XMLAdaptor {
const promises = styles.map(
({ url, base }) =>
new Promise(rs => {
const cache = Cache.get(url)
// const cache = Cache.get(url)

if (useLocalStorageCache && cache?.data) {
// console.log('Loads CSS from cache %s', url)
// if (useLocalStorageCache && cache?.data) {
// // console.log('Loads CSS from cache %s', url)

rs({ base, data: cache.data })
return
}
// rs({ base, data: cache.data })
// return
// }

Request.get(url).then(rsp => {
if (useLocalStorageCache) {
console.log('No CSS cache - setting cache for %s', url)
Cache.set(url, rsp.data)
}
// if (useLocalStorageCache) {
// console.log('No CSS cache - setting cache for %s', url)
// Cache.set(url, rsp.data)
// }

rs({ base, data: rsp.data })
})
Expand Down

0 comments on commit 64546a3

Please sign in to comment.