title: Using PHP, MySQL and Redis
body: <p>I'm trying to understand how to cache databases in a good way and what to do and what not to do. Though I want to make sure that I've understood everything correctly so far. Maybe you can help me?</p>
  
  <p>At the moment I don't have any caching and I do everything locally using XAMPP. For storing data I use MySQL/PHPMyAdmin and to grab, add and update data I simply make Mysqli queries in PHP. As I said, I don't have any caching as of now, so I started looking for the best ways to do it.</p>
  
  <p>After a quick search I found <a href="http://redis.io/" rel="noreferrer">Redis</a>. So my idea is to store data using MySQL and cache it with Redis. Is this a good way to do it or have I understood everything completely wrong?</p>
  
  <p>If I'm right, how do I implement Redis? How do I cache data? Do I make a check in PHP if the data I want is cached, if it is then take it from the cache, else take it from the MySQL database.</p>
  
  <p>Would really like to know if I'm on the right track.</p>