I am modifying my google chrome extension and researching a way to cache data. The extension displays 2 types of content, they both can be treated as arrays of objects (less than 5kb in total), say news list from RSS feed and list of recipes.
To save loading time first I could use chrome.storage.sync
to store data once and check cache life every other time and renew if needed.
But the difference is that it's a new tab type extension, so it' being loaded every time user opens a new tab - so load speed of the data for the UI is even more critical. So I was thinking about using an extra background page or background script (https://developer.chrome.com/extensions/background_pages) to store that data there just as simple objects in memory.
Can the background script be considered a way to go or there are any restrictions with access (or speed of access) or data transfer between new tab script and the background?
I've also checked that question, but that didn't help How do I cache data in Chrome Extension?