2

I have a huge database with complex relations and want to cache some index and strings in order to have much faster access to them, so that I want to store them in some sort of cache to minimize accessing DB to fetch informations.

I searched and found Memcached and Redis can be a suitable for my purpose. After more researching, I found out Memcache has limitation about storing in it's "Value" ( Key -> Value ).

In Redis, Is it possible to store a multi dimension array ( array of arrays of arrays ) in a "Value" ( Key -> value ). which can be a 20MB or 30MB of data in maximum.

if Yes, Doesn't that decrease performance?

1
  • Both increase performance as they're ram based systems. just use memcached to cache all your sql queries so that rather than hitting the db users hit the memcache instead saves all around Commented Nov 29, 2013 at 11:48

2 Answers 2

4

If I'm not mistaken, Redis string values have a limit of 512MB.

http://redis.io/topics/data-types

String

A String value can be at max 512 Megabytes in length.

List

The max length of a list is 232 - 1 elements (4294967295, more than 4 billion of elements per list).

Set

The max number of members in a set is 232 - 1 (4294967295, more than 4 billion of members per set).

Hash

Every hash can store up to 232 - 1 field-value pairs (more than 4 billion).

Sign up to request clarification or add additional context in comments.

Comments

1

You should consider using mongoDB for your use case. It will enable indexing and querying complex nested structure and will be fast as well.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.