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

Add optional parameters/ini settings to allow early eviction for added keys for apcu_store, apcu_add, etc? #476

Open
TysonAndre opened this issue Nov 14, 2022 · 0 comments

Comments

@TysonAndre
Copy link
Contributor

Example use cases:

  • If APCu is used to permanently store individual config values, then the current behavior of respecting the TTLs makes sense, for predictability

  • If APCu is used in front of redis/memcached or a fast enough database/service/etc, then users should have a way to indicate that it's fine to evict keys to make room for new keys (it may make sense to prefer evicting keys with an older last accessed time, fewer hits vs time unit, etc)

    (Aside: Internally, memcached always allows for early eviction, when I last checked)

    This would also allow APCu to safely start being used as a short-lived cache in front of memcached in places that didn't use it that way before (though Fine-grained locking #337 may become a bottleneck if that results in many more calls to APCu and hundreds of CPU cores)

Related to #369

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

1 participant