Commit b4e498c
authored
Stop looking in localStorage for temporary cache (#8579)
This pull request simplifies the behavior of the `getTemporaryCache`
method in `BrowserCacheManager` by removing legacy fallback logic and
updates the related unit tests accordingly. The main focus is to ensure
that temporary cache retrieval is streamlined and no longer checks local
storage for items set by old versions.
Fixes #8577
**Browser cache logic simplification:**
-
[`BrowserCacheManager.ts`](diffhunk://#diff-9fe0cda3d1225c92740f98cfd73639c5db18bf24234c273756a855e5b48adae2R1904-R1906):
Removed fallback logic in `getTemporaryCache` that previously checked
`localStorage` for temporary cache items if not found in session/memory
storage. The method now only checks the intended temporary cache
storage. Added a trace log for method invocation.
**Test updates:**
-
[`BrowserCacheManager.spec.ts`](diffhunk://#diff-1f474f3b5ffedcb4da969f60d720532be75a02c6d91e65b7d1e3c107b0a4f13dL1878-L1900):
Removed the test that verified fallback to `localStorage` in
`getTemporaryCache`, as this behavior is no longer supported.
---------
Co-authored-by: -g <-g>1 parent 1b261b4 commit b4e498c
3 files changed
Lines changed: 12 additions & 46 deletions
File tree
- change
- lib/msal-browser
- src/cache
- test/cache
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1901 | 1901 | | |
1902 | 1902 | | |
1903 | 1903 | | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
1904 | 1908 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
1910 | | - | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
| 1909 | + | |
1928 | 1910 | | |
1929 | 1911 | | |
1930 | 1912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1875 | 1875 | | |
1876 | 1876 | | |
1877 | 1877 | | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
1881 | | - | |
1882 | | - | |
1883 | | - | |
1884 | | - | |
1885 | | - | |
1886 | | - | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
1899 | | - | |
1900 | | - | |
1901 | 1878 | | |
1902 | 1879 | | |
1903 | 1880 | | |
| |||
0 commit comments