The user profile images are stored in a separate fileserver, and I am thinking of caching them in memcached. The memcached server is local to the app, and each image is less than 1MB.
But I saw over here that using memcached for images is a bad idea. Is it really? I am really not convinced.
Any best practices and suggestions? I am using SpyMemcached Java Client.
Linux automatically caches files that are read from disk. Caching proxies like Squid are also good at caching images.
So… there are certainly are better tools for the job. On the other hand, nginx recently added memcached support. Without context, it’s really hard to judge that recommendation.
They might mean “Don’t serve images from memcached via a PHP script”, in which case, they’re absolutely correct — PHP adds tons of overhead. But I don’t necessarily see how using Nginx’s memcache feature to store and serve images would be a bad thing.
Edit: It appears that facebook may have cached profile images in memcached at one point.