Memcached set_many and get_many failing when trying more than 100 k,v pairs in django..why? -
i'm have dictionary of data cache, use:
cache.set_many(dict_to_cache, ttl)
for dictionary has more 100 entries, not seem set. no error thrown, , doesn't seem getting evicted, doesn't save. work around break dictionary 100 key chunks via method:
def dict_chunker(data, size=100): = iter(data) in xrange(0, len(data), size): yield {k:data[k] k in islice(it, size)}
that seems work fine, wondering make not set dictionaries on 100 entries?
i had same issue getting more 100 keys @ time.
dict = cache.get_many(list_of_keys)
does know why happen?
Comments
Post a Comment