1

What could be the biggest size of an array to be put in Redis cache?

I'm considering storing data temporarily in Redis cache. The overall process of storing data is like this -

// This is from Laravel framework (PHP)

$existing_data = Cache::store('redis')->get('existing_data');

array_push($existing_data, ['elem1' => $elem1, 'elem2' => $elem2, 'elem3' => $elem3]);

Cache::store('redis')->put('existing_data', $existing_data, 30*60);

As you can see, the size of array will keep on increasing and I'm suspecting about 150,000 - 200,000 sub-arrays in my $existing_data; before I'll pull them from Redis and store them in my database.

My redis server has 1.5GB memory; and I'm wondering if there's any limit it will put when storing the array.

TheBigK
  • 451
  • 5
  • 17
  • The limits are here... https://redis.io/topics/data-types – Mark Setchell Jun 27 '19 at 16:41
  • Possible duplicate of [What is the maximum value size you can store in redis?](https://stackoverflow.com/questions/5606106/what-is-the-maximum-value-size-you-can-store-in-redis) –  Jul 02 '19 at 20:52

0 Answers0