I plan to optimize the performance of my web application with data caching. It uses MySQL so the options I found so far are these 2:
- use MySQL query cache feature
- make a table using memory storage engine and keep in it the full result of queries as serialized arrays;
I would prefer the second one, since there is only a table I need to cache, and the query cache on table modification invalidates all queries derived from that table at once. While in my memory table I can delete only the rows that have been modified (UPDATED). Course this will require more bits of code, but I guess the overall performance would be better.
What do you recommend and why?
Make a table using memory storage engine and keep in it the full result of queries as serialized arrays;
see this
hope its help you to make fast web application