Commit 28ca8a8
authored
Use custom cache over FSCache if specified (#1285)
* Use custom cache over FSCache if specified
Currently, if both `useFSCache` and `useCustomCache` env options are set to true (perhaps because `useFSCache` is true by default and the user forgot to unset it), the code defaults to instantiating a FileCache instead of using the custom cache implementation passed in by the user. This commit changes the default to be the custom cache if specified.
* Use custom cache over browser cache if specified
If `useCustomCache` is set, try to use the custom cache before falling back to the browser or the fs caches.
* Throw an error if fs is not available for FSCache
Meant to handle cases where the user sets `useFSCache` from an environment that doesn't support `fs`.1 parent c536857 commit 28ca8a8
1 file changed
+19
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
421 | 437 | | |
422 | 438 | | |
423 | 439 | | |
| |||
435 | 451 | | |
436 | 452 | | |
437 | 453 | | |
438 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
439 | 457 | | |
440 | 458 | | |
441 | 459 | | |
442 | 460 | | |
443 | 461 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
0 commit comments