question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache not responding

See original GitHub issue

When I clear the browser cache, enter my store’s home page and then navigate to any category or product page I get the error message “Cache not responding”. After this happens and I check Application > IndexedDB in Chrome I can see that nothing gets added to the database. For example, if I try to add something to the cart I can see that it’s not added in the database. I can place an order in the checkout but it’s not sent to the backend for processing at all. It’s not found in syncTasks either.

Refreshing the page solves the problem. The problem appears in my dev store running v1.0.5 and the vue storefront demo page. I haven’t checked if it’s present in developer build.

I tried looking into the problem myself and found out that something seems to happen in lib/search.js in the function quickSearchByQuery. If I call ready() on global.$VS.db.elasticCacheCollection._localForageCollection I can see that the promise is pending and not resolved at the time getItem is called.

I used the promise from ready() and placed the whole cache.getItem block inside the then() part and this solved the problem. IndexedDB shows items as expected, no error message and no refresh needed.

I’m new to JS and Vue development so I’d appreciate if someone more experienced could look into this and maybe find a better solution or explain what happens. But it seems like elasticCacheCollection is just not ready when it’s called? Is there a better way to wait for it?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
nstgmkcommented, Jun 22, 2018

You’re probably right 😃 I’ll try your solution instead and see if it works. Thanks!

0reactions
pkarwcommented, Jun 22, 2018

Thanks! Without Your observation i wouldn’t have fix it! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixed: Google Chrome is waiting for cache issue on Windows 10
Don't continue waiting for the cache issue on Windows 10 to clear on Google. Use these simple troubleshooting solutions to fix the issue...
Read more >
How to fix Google Chrome is waiting for cache issue on ...
The simple answer is, because the information that Chrome downloaded to your PC has become inaccessible. The cache is where your browser stores ......
Read more >
Troubleshooting: Clearing Browser Cache & Cookies
Clearing browser cache and cookies usually results in a speedier internet experience. With cookies and a full cache, browsers "remember" old ...
Read more >
What is a cache? And why does clearing it fix things? - Zapier
It's timeless advice: if a website isn't loading properly, clear your cache. We've all done it, noticed that things work again, ...
Read more >
How to clear cache if google chrome is not working - YouTube
car-ey-lyst: (noun) Any special person who enjoys creating, repairing or optimizing PCs to their full potential and beyond!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found