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

fix(purge) prevent purging when using a custom LRU cache #79

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

thibaultcha
Copy link
Owner

As it stands, calling purge() on an instance that has a custom LRU
cache will also garbage collect said instance, and a new one created by
lrucache.new() will take its place.

As long as the new flush_all() method for LRU caches isn't supported
(introduced in OpenResty 1.13.6.2), we shall be proactive about this
limitation and prevent the use of purge().

This limitation is soon to be lifted for OpenResty >= 1.13.6.2 thanks
to #78.

As it stands, calling `purge()` on an instance that has a custom LRU
cache will also garbage collect said instance, and a new one created by
`lrucache.new()` will take its place.

As long as the new `flush_all()` method for LRU caches isn't supported
(introduced in OpenResty 1.13.6.2), we shall be proactive about this
limitation and prevent the use of `purge()`.

This limitation is soon to be lifted for OpenResty >= 1.13.6.2 thanks
to #78.
@thibaultcha thibaultcha merged commit 37d9578 into master Mar 28, 2019
@thibaultcha thibaultcha deleted the fix/no-purge-with-custom-lru branch March 28, 2019 00:41
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

Successfully merging this pull request may close these issues.

1 participant