assets/js/lib/jquery.couch.js
function(cacheNum) {
      if (cacheNum === undefined) {
        cacheNum = 1;
      }
      if (!uuidCache.length) {
        ajax({url: this.urlPrefix + "/_uuids", data: {count: cacheNum}, async:
              false}, {
            success: function(resp) {
              uuidCache = resp.uuids;
            }
          },
          "Failed to retrieve UUID batch."
        );
      }
      return uuidCache.shift();
    }
function(cacheNum) {
      if (cacheNum === undefined) {
        cacheNum = 1;
      }
      if (!uuidCache.length) {
        ajax({url: this.urlPrefix + "/_uuids", data: {count: cacheNum}, async:
              false}, {
            success: function(resp) {
              uuidCache = resp.uuids;
            }
          },
          "Failed to retrieve UUID batch."
        );
      }
      return uuidCache.shift();
    }
function ( cacheNum ) { if ( cacheNum === undefined ) { cacheNum = 1 ; } if ( ! uuidCache . length ) { ajax ( { url : this . urlPrefix + "/_uuids" , data : { count : cacheNum } , async : false } , { success : function ( resp ) { uuidCache = resp . uuids ; } } , "Failed to retrieve UUID batch." ) ; } return uuidCache . shift ( ) ; }
Fetch a new UUID
@see <a href="http://techzone.couchbase.com/sites/default/files/
uploads/all/documentation/couchbase-api-misc.html#couchbase-api-
misc_uuids_get">docs for /_uuids</a>
@param {Int} cacheNum Number of uuids to keep cached for future use
Fetch a new UUID