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

Transient expiration too far in the future? #23

Open
seanosh opened this issue Jan 29, 2014 · 1 comment
Open

Transient expiration too far in the future? #23

seanosh opened this issue Jan 29, 2014 · 1 comment

Comments

@seanosh
Copy link

seanosh commented Jan 29, 2014

Ran into an issue where the value was seemingly being set in memcached (memcached -vv output):

<28 get wp_:transient:tlc__6e3297563c742a997cbc051c30b44a71
>28 END
<28 get wp_:transient:tlc_up__6e3297563c742a997cbc051c30b44a71
>28 END
<28 set wp_:transient:tlc__6e3297563c742a997cbc051c30b44a71 1 1200 16982
>28 STORED

However, when I attempted to retrieve the value:

<29 get wp_:transient:tlc__6e3297563c742a997cbc051c30b44a71
>29 END

Indicating the value wasn't stored, despite memcached returning the successful STORED response.

After some digging, it seems the maximum value for the expires time in Memcache::set is only 30 days (2592000 seconds) (from: http://www.php.net/manual/en/memcache.set.php).

Example gist:
https://gist.github.com/seanosh/8692567

I'd happily put together a PR to fix (changing the expiration value to ensure it is always less than 2592000), but I feel like surely someone would've noticed that the values were reporting a successful set, and subsequent gets were returning false - so I'm wondering if I'm crazy or just missing something.

Info about my platform:

PHP version: 5.4.24
PHP memcache version: 3.0.8
memcached version: 1.4.13

Thanks!

@prettyboymp
Copy link

After further review, it looks like it would be better for the fix to be made to the memcached plugin so that it properly handles all expirations more than 30 days in the future.

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