lua-resty-lrucache icon indicating copy to clipboard operation
lua-resty-lrucache copied to clipboard

Incr method

Open splitice opened this issue 8 years ago • 12 comments

Incrementing by value, defaults to 1. Happy to do the documentation if you do the tests :)

splitice avatar Nov 25 '15 09:11 splitice

@splitice I can do the documentation if you do the tests ;)

agentzh avatar Nov 25 '15 09:11 agentzh

Haha, I would rather this not be the same as the incr method pull request from a year ago for the ngx-lua-module that's still pending due to me not having time to learn the test format and set up an environment for it.

splitice avatar Nov 25 '15 09:11 splitice

@splitice Heh, sorry about your pending PRs. Bug fixes usually take much higher priority than new features. But don't worry, I'll eventually clean up the pending PR list when I have a chance :) To assure you, those PRs are never forgotten.

agentzh avatar Nov 25 '15 09:11 agentzh

No need to worry, its not really a concern for me since we build our own repo anyway, just trying to open source what we can.

This one here should be pretty easy :+1:

I may also do flush_all from the TODO list in the future, I suspect we will need it down the line.

splitice avatar Nov 25 '15 09:11 splitice

@splitice Awesome! Thank you a lot for your contribution!

agentzh avatar Nov 25 '15 09:11 agentzh

@splitice BTW, I'll write up some tutorials on the test toolchain used here soon :)

agentzh avatar Nov 25 '15 09:11 agentzh

That would be great. I am in openresty-en so I'll keep an eye out. :)

splitice avatar Nov 25 '15 09:11 splitice

+1

i19 avatar May 30 '16 15:05 i19

Incr now respects expiration time. Get now checks expiration time before LRU Added basic cleanup method to walk the last N nodes (LRU order) and clear if expired

splitice avatar Jun 02 '16 12:06 splitice

@splitice See https://openresty.gitbooks.io/programming-openresty/content/testing/index.html for the tutorial on the test toolchain. Let me know if there's anything missing.

agentzh avatar Jun 02 '16 21:06 agentzh

Sorry I dont currently have time to undertake that. Just moving some of the patches made in our private repo into the public forks.

Anyone: feel free to undertake the test building. Submit a PR to my fork and I'll happily accept to forward onto this PR.

splitice avatar Jun 05 '16 04:06 splitice