code: def query(self, action=None):
          
          if action in self.cache:
              return self.cache[action]['query'].replace('&format=json', '')
          return self.cache.keys() or None
docs: returns cached query string (without &format=json) for given action,
          or list of cached actions