title: how redis/memcached caching is different from Etag caching ?
body: <p>i can see that restful has a inbuilt caching mechanism called Etags then  why do we need to cache the end points using redis or memcached . adding to that with etags we can check if the resource has modified or not.</p>
  
  <p>here is the sample redis caching code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const getBook = (req, res) =&gt; {
    let isbn = req.query.isbn;
    let url = `https://www.googleapis.com/books/v1/volumes?q=isbn:${isbn}`;
    return axios.get(url)
      .then(response =&gt; {
        let book = response.data.items;
        // Set the string-key:isbn in our cache. With he contents of the cache : title
        // Set cache expiration to 1 hour (60 minutes)
        client.setex(isbn, 3600, JSON.stringify(book));
  
        res.send(book);
      })
      .catch(err =&gt; {
        res.send('The book you are looking for is not found !!!');
      });
  };
  
  const getCache = (req, res) =&gt; {
    let isbn = req.query.isbn;
    //Check the cache data from the server redis
    client.get(isbn, (err, result) =&gt; {
      if (result) {
        res.send(result);
      } else {
        getBook(req, res);
      }
    });
  }
  
  app.get('/book', getCache);</code></pre>
  </div>
  </div>
  </p>