1

im trying to do some development where i will be implementing web cache.

Im using codeigniter 4 for this and it did have cache library built-in.

However, there are other 3rd party cache software like redis.

Based on my research, both serve the same purpose.

Therefore, what is the need of redis instead of my framework cache?

1 Answers1

1

While they may serve the same purpose, adding redis to your project you will offload the caching to a different server. Thus reducing the load of your app server.

It mostly depends on your setup and the expected load:

  • If it's simple project without much traffic or queries, you can keep using codeigniter's caching.
  • If you expect lots of traffic or tons of SQL/NoSQL queries, it's best to offload the caching to a dedicated redis server/service to keep it running smoothly. This adds some complexity to the project of course.

If you are interested in reading more points of view, this post has some good points on Redis as to when to use it or not: https://stackoverflow.com/a/3967052/9442192

izwicky
  • 104
  • 1
  • 11
  • can you explain on at what stage a developer should consider to scale up the app? when cpu hit n%?ram?queries hit certain frequency? just your personal opinion. lots of the reading in the internet is all about "depend". Im planning to do somekind of cloud POS system. –  May 12 '20 at 13:33