Skip to content

bugfix: clear cache for sources of federation #617

Matthieu Fesselier requested to merge bugfix/617-clear-cache-federation into master

Closes #617 (closed)

Test case:

    <sib-display
      data-src="https://api.test1.startinblox.com/sources/circles/"
      fields="name"
    ></sib-display>

Add window.store = store in src/libs/store/store.ts so you can use the store in the console.

In the console, do:

store.cache
// should display 6 resources, including:
// https://api.test1.startinblox.com/sources/circles/
// https://api.test1.startinblox.com/circles/
// https://api.test2.startinblox.com/circles/

store.clearCache('https://api.test1.startinblox.com/sources/circles/');
store.cache // to check the result

// before the fix, it should delete
// https://api.test1.startinblox.com/sources/circles/

// With the current fix, it should also delete
// https://api.test1.startinblox.com/circles/
// https://api.test2.startinblox.com/circles/

Merge request reports