code: def _write_indexlist(self, name):
          
          d = [self._site.timeline.index(p) for p in getattr(self._site, name)]
          self.db.delete('site:{0}'.format(name))
          if d:
              self.db.rpush('site:{0}'.format(name), *d)
docs: Write a list of indexes.