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

Maybe add a How It Works section to README.md #57

Closed
phpguru opened this issue Jan 3, 2018 · 3 comments
Closed

Maybe add a How It Works section to README.md #57

phpguru opened this issue Jan 3, 2018 · 3 comments
Assignees

Comments

@phpguru
Copy link

phpguru commented Jan 3, 2018

This project looks great, but I had some technical questions about how lada-cache actually works.

  1. Does it make an MD5 of the query via toSql() or another object and check if that exists?
  2. How would I inspect the keys created by lada-cache in Redis CLI?
  3. How long are the TTLs for query results cached?
  4. If a new field data is written to the db, how does the query cached become invalidated?
  5. How are cached query results serialized into Redis?
  6. Can it be used with PHPRedis (not Predis)?

Without looking at the actual source code it is difficult to understand what is actually happening, which, I believe, is an important factor to decide if this library is right for me.

@spiritix spiritix self-assigned this Jan 4, 2018
@spiritix
Copy link
Owner

spiritix commented Jan 8, 2018

Good suggestion, thanks. Created a Wiki with two articles as a starting point: https://github.com/spiritix/lada-cache/wiki

Regarding PHPRedis: I currently don't see a reason to implement this, Predis (especially combined with phpiredis) is just much faster and more stable.

@spiritix spiritix closed this as completed Jan 8, 2018
@phpguru
Copy link
Author

phpguru commented Jan 9, 2018

I have always used PHPRedis over predis for C code speed execution. I didn't realize that phpiredis seems to be the preferred way to connect to Redis from PHP nowadays. Thanks for the wiki!

@spiritix
Copy link
Owner

Well, I don't advise anyone against using PHPRedis, the thing is just Lada Cache should not have hard dependencies on the server side since a lot of users wouldn't be able to install them. Therefore PHPRedis wasn't an option at all, at least not as default driver. Regarding speed, I'd strongly suggest installing phpiredis, it's actually pretty fast since it's based on hiredis which is also written in C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants