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

TTL issues #167

Closed
tgabi333 opened this issue Jan 26, 2016 · 3 comments
Closed

TTL issues #167

tgabi333 opened this issue Jan 26, 2016 · 3 comments

Comments

@tgabi333
Copy link

Can you approve that this is a bug:

php -r "var_dump(apc_store('hello', 'h', 2)); sleep(4); var_dump(apc_exists('hello')); var_dump(apc_fetch('hello'));"

outputs:

bool(true)
bool(true)
string(1) "h"

php 5.6.17 with APCU 4.0.7 and apc.enable_cli=1

@krakjoe
Copy link
Owner

krakjoe commented Jan 26, 2016

This is symptomatic of default configuration where apc.use_request_time is enabled, this results in all APC API calls using the same timestamp, so expiry cannot be detected in a test scenario.

Simply disable apc.use_request_time in your test suite.

@krakjoe krakjoe closed this as completed Jan 26, 2016
@tgabi333
Copy link
Author

@krakjoe Thank you!

@tgabi333
Copy link
Author

What is about the negative TTL?
I've still got false result for this:

php -r "var_dump(apc_store('hello', 'h', -1)); var_dump(apc_exists('hello')); var_dump(apc_fetch('hello'));"

outputs:

bool(true)
bool(true)
string(1) "h"

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