Аполлон угловой CachePersistor - PullRequest
0 голосов
/ 19 ноября 2018

Я застрял с apollo cachepersitor, я получаю сообщение об ошибке, что локальное хранилище заполнено, даже после того, как после официального руководства apollos и предложений по stackoverflow, которые предлагают, чтобы я включил maxSize. Ошибка все еще продолжается, и правило maxSize никогда не применяется.

const persistor = new CachePersistor({
      cache,
      storage: window.localStorage,
      maxSize: 1900000,
      debug: true,
    })

отладки показывают, что кеш продолжает сохраняться

[apollo-cache-persist] Persisted cache of size 65416
[apollo-cache-persist] Persisted cache of size 68471
[apollo-cache-persist] Persisted cache of size 1178469
[apollo-cache-persist] Purged cache storage
[apollo-cache-persist] Persisted cache of size 2556195
[apollo-cache-persist] Purged cache storage
[apollo-cache-persist] Persisted cache of size 2702136
[apollo-cache-persist] Purged cache storage
[apollo-cache-persist] Persisted cache of size 3448243
[apollo-cache-persist] Purged cache storage   vendor.js:139549 

и тогда я получаю ошибку belwo из локального хранилища, превышающего хромовую квоту.

apollo-cache-persist] Error persisting cache DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'apollo-cache-persist' exceeded the quota.

вся помощь будет приветствоваться.

...