Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling clear() without specified group fails #55

Closed
fvoska opened this issue Dec 19, 2016 · 3 comments
Closed

Calling clear() without specified group fails #55

fvoska opened this issue Dec 19, 2016 · 3 comments

Comments

@fvoska
Copy link

fvoska commented Dec 19, 2016

globalOptions.redisClient.del(); fails with:

ReplyError: ERR wrong number of arguments for 'del' command
    at parseError (/home/fiouch/diplomski-fvoska/node_modules/redis-parser/lib/parser.js:181:12)
    at parseType (/home/fiouch/diplomski-fvoska/node_modules/redis-parser/lib/parser.js:269:14)

Redis DEL command requires parameters, as per documentation.

Not sure if this has changed over time as I have only recently started using redis.

  • apicache is at 0.3.6
  • redis is at 2.6.3
  • redis-parser is at 2.3.0
  • redis-server 3.0.7 is running on Ubuntu 16.04

I temporarily fixed it on my end by replacing globalOptions.redisClient.del(); with globalOptions.redisClient.flushall(); But this flushes whole redis, not only apicache items. DEL should get all keys used in apicache (maybe get from index.all?) as parameters.

@kwhitley
Copy link
Owner

Thanks @fvoska - I'll look into that this morning!

@kwhitley
Copy link
Owner

@fvoska - please update and let me know if this fixes your issue... I don't use redis-parser, so I can't be certain it solves your specific case, but I've updated the internal redis clear all function (from another contributor) to delete key by key to preserve non-apicache entries (and updated tests to better verify success with redis).

@fvoska
Copy link
Author

fvoska commented Dec 23, 2016

Hi, sorry for late reply.
I updated to 0.7.3 and it works ok now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants