          except (ValueError, TypeError):
              timeout = 300
          self.default_timeout = timeout
  
      def get(self, key, default=None):
          """
          Fetch a given key from the cache.  If the key does not exist, return
          default, which itself defaults to None.
 
</s>
    def add(self, key, value, timeout=None):
        """
        Set a value in the cache if the key does not already exist.  If
        timeout is given, that timeout will be used for the key; otherwise
        the default cache timeout will be used.
        """
        raise NotImplementedError

          except (ValueError, TypeError):
              timeout = 300
          self.default_timeout = timeout
  
    def add(self, key, value, timeout=None):
        """
        Set a value in the cache if the key does not already exist.  If
        timeout is given, that timeout will be used for the key; otherwise
        the default cache timeout will be used.
        """
        raise NotImplementedError

      def get(self, key, default=None):
          """
          Fetch a given key from the cache.  If the key does not exist, return
          default, which itself defaults to None.
keep keep keep add keep keep keep keep
 Fixed #4831 -- Added an "add" cache key method, for parity with memcached's
API. This works for all cache backends. Patch from Matt McClanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
django/core/cache/backends/base.py