I have an object (actually, an array of objects) that's 302MB. When I try to cache it with memcached it doesn't work, no matter how much memory I give memcached, apparently because memcached has a 1MB limit on objects that it can cache. (I might be wrong about that last part. I haven't been able to find great documentation.)
Any suggestions on how to cache this thing? I'm using PHP/symfony on Linux.
Quoting
However, even when increasing the memory, this is hardly a good choice IMO. A better idea would be to break the object apart into smaller pieces and then cache indididual parts of it.
Quoting Why are items limited to 1 megabyte in size?
You could perhaps use shared memory (but with that size I would vote against it) or use a RAM drive.
Is this for one webserver or are you looking for a common cache for multiple web servers?
I still join the others when they are saying that you probably need another approach. Try to explain what kind of data it is that you want to cache.
There's no way that you should need a 302Mb instance of an object (or array of objects) to be cached.
Without seeing the code, I can't suggest how...but there has to be a good way to refactor so that you're caching on a smaller scale.
In alternative you can change the limit quickly by edit the configuration file [/etc/memcached.conf] adding:
After restart your service.