def addItem(self, item):
        # a new item is available
        self._items[item] = SMBool(True, items=[item])
        if self.isCountItem(item):
            count = self._counts[item] + 1
            self._counts[item] = count
            self.computeNewCacheKey(item, count)
        else:
            self.computeNewCacheKey(item, 1)

        Cache.update(self.cacheKey)
    def removeItem(self, item):
        # randomizer removed an item (or the item was added to test a post available)
        if self.isCountItem(item):
            count = self._counts[item] - 1
            self._counts[item] = count
            if count == 0:
                self._items[item] = smboolFalse
            self.computeNewCacheKey(item, count)
        else:
            self._items[item] = smboolFalse
            self.computeNewCacheKey(item, 0)

        Cache.update(self.cacheKey)
    def addItems(self, items):
        if len(items) == 0:
            return
        for item in items:
            self._items[item] = SMBool(True, items=[item])
            if self.isCountItem(item):
                count = self._counts[item] + 1
                self._counts[item] = count
                self.computeNewCacheKey(item, count)
            else:
                self.computeNewCacheKey(item, 1)

        Cache.update(self.cacheKey)
    def addItem(self, item):
        # a new item is available
        already = self.haveItem(item)
        isCount = self.isCountItem(item)
        if isCount or not already:
            self._items[item] = SMBool(True, items=[item])
        else:
            # handle duplicate major items (plandos)
            self._items['dup_' + item] = True
        if isCount:
            count = self._counts[item] + 1
            self._counts[item] = count
            self.computeNewCacheKey(item, count)
        else:
            self.computeNewCacheKey(item, 1)

        Cache.update(self.cacheKey)
    def resetItems(self):
        self._items = {item: smboolFalse for item in self.items}
        self._counts = {item: 0 for item in self.countItems}

        self.cacheKey = 0
        Cache.update(self.cacheKey)