Cache the card for faster future lookups. Removes the oldest card
        when the card cache stores more cards then this libraries cache limit.

def cache_card(self, card):
        """
        Cache the card for faster future lookups. Removes the oldest card
        when the card cache stores more cards then this libraries cache limit.
        """
        code = card.code
        self.card_cache[code] = card
        if code in self.card_cache_list:
            self.card_cache_list.remove(code)
        self.card_cache_list.append(code)

        if len(self.card_cache_list) > self.cachelimit:
            del self.card_cache[self.card_cache_list.pop(0)]