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.

[BUG]: Cache increment/decrement doesn't work

See original GitHub issue

Description

Reproduce

  1. Create a new “entry”: to https://api.m3o.com/v1/cache/Set with:
    {"key":"lol","ttl":0,"value":"123"}
    
  2. Increment the entry: to https://api.m3o.com/v1/cache/Increment with:
    {"key":"lol","value":3}
    
    and receive
    {"Id":"cache.increment","Code":500,"Detail":"Error incrementing cache","Status":"Internal Server Error"}
    
  3. Decrementing the entry: to https://api.m3o.com/v1/cache/Decrement with:
    {"key":"lol","value":2}
    
    and receive:
    {"Id":"cache.decrement","Code":500,"Detail":"Error decrementing cache","Status":"Internal Server Error"}
    

Screenshots

No response

Additional information

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
asimcommented, Feb 24, 2022

I’ll play around with it. Expect a fix in a few hours.

0reactions
asimcommented, Feb 25, 2022

It’s not a changing value. Can you provide example usage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Increment/Decrement across a set of nodes? - Discuss Dgraph
I think that issue doesn't apply here cuz the value is coming from math. ... This increment approach should work fine with several...
Read more >
Counter Helper GUI doesn't allow for 'Unlimited' setting #8151
Try to increment it using i.e. Dev Tools->Services->counter.increment using the newly created entity's ID. The counter fails to increment ...
Read more >
Why avoid increment ("++") and decrement ("--") operators in ...
Show activity on this post. The ++ (increment) and -- (decrement) operators have been known to contribute to bad code by encouraging excessive...
Read more >
Cache fallback doesn't take increment index into account
We have a job that builds the "default" cache and then in a MR pipeline expect to be able to fallback to it...
Read more >
GraphQL and Apollo Client by Example: Part 3 - codeburst
We refactor the increment and decrement features to mutations; ... object (thus contains the cache; so we can read the current local state)....
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