views:

259

answers:

1

Does anyone know about any solutions for keeping data bigger, than 1mb in memcached ?

This is no big deal to cut big data to 1mb pieces before setting and merge this pieces after getting from memcached. And this algorithm can work transparently for users.

This can works on the base of this snippet http://www.djangosnippets.org/snippets/488/

+1  A: 

You can ask memcached to increase the ceiling, but it's quite often a sign that you're doing something wrong.

Most of the time, when we dig into the things people are trying to do with larger objects, they are backing themselves into a corner and start asking questions like "OK, now how can I request just part of this object?"

Sometimes, there's a legitimate need for larger objects (so we support that).

Dustin
In my case, it's not necessary get a part of cached data. I try to cache big sitemap xml file (about 1.5 Mb). How it's possible to increase the ceiling? Any config parameters? I think its necessary to rebuild memcached package for this pourpose, isn't it?
ramusus
I don't think putting your sitemap.xml into memcached makes a huge amount of sense. Just generate it in batch and distribute it.
Dustin