tags:

views:

108

answers:

1

hi i want to know why i cant store multi dimensional(array size is more than 1000)

$memcache = new Memcache;

$memcache->connect('localhost', 11211) or die ("Could not connect");

the above s working correctly...

the below one have error...

   $memcache->set('key', $sear, false, 60) or die ("Failed to save data at the server");

   if the $sear is string or object array then no problem for store data at the server..

  but i store multi dimensional array in memcached,,i will get the error is 

    Failed to save data at the server

thanks and advance

+1  A: 

The array you're trying to store is probably too large. Memcache has a limit on the size of a single item. The maximum size per item is 1,048,576 Bytes or 1MB.

Here is another thread regarding this issue...

http://stackoverflow.com/questions/1203435/can-you-store-an-array-in-memcache

John Himmelman