Много разных изменений
This commit is contained in:
@@ -135,7 +135,8 @@ export async function logout() {
|
||||
|
||||
export const api = {
|
||||
get: async (url) => {
|
||||
const isCachable = CACHABLE_PREFIXES.some(prefix => url.startsWith(prefix));
|
||||
const isCachable = !url.includes('/page') && !url.includes('/options')
|
||||
&& CACHABLE_PREFIXES.some(prefix => url.startsWith(prefix));
|
||||
if (isCachable) {
|
||||
if (!cache.has(url)) {
|
||||
cache.set(url, await apiFetch(url, 'GET'));
|
||||
|
||||
Reference in New Issue
Block a user