5

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

zahir hussain
  • 3,711
  • 10
  • 29
  • 36

1 Answers1

3

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...

Can you store a PHP Array in Memcache?

Community
  • 1
  • 1
John Himmelman
  • 21,504
  • 22
  • 65
  • 80