Reputation: 49
Is there a way to handle the common Queries sent to MySQL to prevent unnecessary bandwidth usage ?
Upvotes: 1
Views: 55
Reputation: 17720
Options are:
Use MySQL to cache queries
Cache locally using Memcached or Redis
Another advantage of handling locally in memcached or Redis is that you can also store compiled/converted results. If you have lost of processing of results (e.g. turn it into an array with other validation and look-up) then you can cache that compiled result instead. But then you need to handle expiry/invalidating the cache which is easy, but requires discipline in your code.
Upvotes: 1