code: def get_history(self):
          
          if hasattr(self, '_history'):
              return self._history
          try:
              self._history = APICallDayHistory.objects.get(
                  user=self.user, creation_date=now().date())
          except APICallDayHistory.DoesNotExist:
              self._history = APICallDayHistory(user=self.user)
              self._history.amount_api_calls = 0
          return self._history
docs: Returns the history from cache or DB or a newly created one.