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).
Memcache is a distributed object store - it's up to you to put objects in and out of this. It's a general purpose cache for any usage.
Squid is a proxy server and a web cache. If everything is through a URL (e.g. REST) then Squid will do the job for free.
So in summary, memcache is general purpose, Squid is for caching the results of a URL.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With