pinterest/pymemcache

Best way to handle max value size?

fabtjar opened this issue · 1 comments

Hey,

I want to limit the size of each value I cache to 3mb. How would you go about doing this? I'm failing to find any settings that could help.

I'm using Django if that makes any difference.

jogo commented

Hi @fabtjar, are you asking how to do it in the server, mecached, side or on the client. If the server side you will have to check the memcached documentation etc. On the client side you can write a custom serialization class that throws an error if the value is too big. Hope that helps.