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

Problems using memcache #22

Open
tomazahlin opened this issue Sep 30, 2015 · 6 comments
Open

Problems using memcache #22

tomazahlin opened this issue Sep 30, 2015 · 6 comments

Comments

@tomazahlin
Copy link

In this Service class:

https://github.com/jaytaph/RateLimitBundle/blob/master/Service/Storage/Memcache.php#L13

In the constructor argument, the \Memcached instance is expected. But when installing the latest https://github.com/LeaseWeb/LswMemcacheBundle, the class does not implement \Memcached, but \MemcachePool. I tried using previous versions, but with all of them I had similar problems and was unable to make this bundle to work properly. Can I get any suggestions? I can make some PR if there is any chance it might be accepted.

Regards, Tomaz

@jaytaph
Copy link
Owner

jaytaph commented Sep 30, 2015

It might be a change in the LswMemcacheBundle, but I have to look into this to make sure. If you have a PR i'm always to check and merge!

@tomazahlin
Copy link
Author

Thanks, I will look into it too. Yes, there is obvious changes in the LswMemcacheBundle, so this bundle should suggest installing a more specific version of the LswMemcacheBundle in the documentation. Even when I used some older version of the bundle, when they extended \Memcached, I got an error that the $flags cannot be passed as reference, when they were null. Thanks for any help.

@fabianoroberto
Copy link

Did someone solving this problem?
As suggested by @tomazahlin i changed https://github.com/jaytaph/RateLimitBundle/blob/master/Service/Storage/Memcache.php#L13 \Memcached into \MemcachePool but i have same error "Cannot pass parameter 2 by reference" with null passed in this instruction $info = $this->client->get($key, null, $cas);

@tomazahlin
Copy link
Author

Hi, I remember I tried to make it work, but had too many problems (that was about a year ago, so I can't tell any details). Probably the author has better chances to fixing this. I look forward for this fix as well, because I would like to add RateLimitBundle to our project.

@fabianoroberto
Copy link

I temporarily solved using doctrineCache instead of Memcache. If we find a solution, I would prefer to use LSW

@mcfedr
Copy link
Collaborator

mcfedr commented Jun 27, 2018

Is it possible you are using the memcache extension, rather than memcached which is the supported version.

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

4 participants