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 expires value always undefined

See original GitHub issue

hi and thanks for store2. trying to set cache expire value, min (ie. fourth parameter) value is always undefined when debug the _.set function in store.cache.js I should not understood something but what ? Here is my code var ustorage = store.namespace(uniqId); ustorage.set('mykey', {firstdata:1, seconddata: 1}, 60);

60 seconds not retrieved in cache ! Same if i do not use namespace. Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nbubnacommented, Jul 12, 2022

No, it’s not you. There’s a bug. When i added replacer support, i broke store.cache.js. I should only be passing “overwrite” to stringify as a replacer if it is a function, otherwise it needs to be passed on to _.set so extensions can use it. I’ll try to fix this Thurs. Sorry, no time before then, i think.

0reactions
nbubnacommented, Jul 15, 2022

The 2.14.1 release is out, it fixes what was broken.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MemoryCache always returns "null" after first expiration
Problem: When the cache for any key expires, all the following calls to get any object in cache return "null". I check the...
Read more >
Context.overwrite truthy so existing array always voided ...
I'm using Apollo Cache and want to write custom code to conditionally merge incoming results with existing cached results. Actual outcome: The ...
Read more >
Configuring the Apollo Client cache
This article describes cache setup and configuration. To learn how to interact with cached data, see Reading and writing data to the cache....
Read more >
Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives (instructions) — in both requests and responses — that control caching in browsers and ...
Read more >
An in-depth introduction to HTTP caching: Cache-Control & ...
When a cache hit happens, it completely offloads the origin server and the latency is dramatically reduced. In fact, when the cache hit...
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