In this article, it is argued that Use Memcache if you frequently fetch random entities from a database, and Squid if you use a REST architecture. Please explain why (with regard to Squid).
REST is all about http and resources.
squid can be used as a reverse proxy, so it will take load from the webserver. the server side can set some expires http header to indicate the timewindow for caching.
this said, the caching is done mainly over standard http headers, therefore its closer to rest styles architecture than caching db queries.