
A tiny library to map Contentful ️ space into Redis ️ - shreyas_a
https://github.com/shreyas-a/redis-contentful
======
shreyas_a
Say your marketing team loves to update content without you being involved?
Great! That is why you should use Contentful CMS. But wait, there is a catch.
Contentful API sometimes takes ~800ms. And this is really a hit when you're
having fancy SSR implemented to boost the performance of your Node JS app. As
the creator of Gmail, Paul Buchheit had said "Every interaction should be
faster than 100ms. Why? Because 100ms is the threshold where interactions feel
instantaneous".

This is where redis will help you crunch the rendering speed. It's really,
really fast! A few ms is all it needs to get your data. By few, I mean less
than 100ms

redis-contentful maps your Contentful space's content types and their
published records into your Redis server. It also maintains the schema of your
Contentful space. All content types are stored in Redis as hashes. Under a
particular hash, the record is stored as a key value pair with id being the
record's key.

You can sync the data manually by calling the sync method on redis-contentful
instance manually or you can add a webhook in Contentful by exposing an
endpoint on your server which will internally call sync. In this way, you
always have the latest content from Contentful right in your Redis.

