    def cache_target_page_counters(self, anchor_name, page_counter_values,
                                   page_maker_index, page_maker):
        """Store target's current ``page_maker_index`` and page counter values.

        Eventually update associated targeting boxes.

        """
        # Only store page counters when paginating
        if self.collecting:
            return

        item = self.target_lookup_items.get(anchor_name)
        if item and item.state == 'up-to-date':
            item.page_maker_index = page_maker_index
            if item.cached_page_counter_values != page_counter_values:
                item.cached_page_counter_values = copy.deepcopy(
                    page_counter_values)

                # Spread the news: update boxes affected by a change in the
                # anchor's page counter values.
                for (_, css_token), item in self.counter_lookup_items.items():
                    # Only update items that need counters in their content
                    if css_token != 'content':
                        continue

                    # Don't update if item has no missing target counter
                    missing_counters = item.missing_target_counters.get(
                        anchor_name)
                    if missing_counters is None:
                        continue

                    # Pending marker for remake_page
                    if (item.page_maker_index is None or
                            item.page_maker_index >= len(page_maker)):
                        item.pending = True
                        continue

                    # TODO: Is the item at all interested in the new
                    # page_counter_values? It probably is and this check is a
                    # brake.
                    for counter_name in missing_counters:
                        counter_value = page_counter_values.get(counter_name)
                        if counter_value is not None:
                            remake_state = (
                                page_maker[item.page_maker_index][-1])
                            remake_state['content_changed'] = True
                            item.parse_again(item.cached_page_counter_values)
                            break
Store target's current ``page_maker_index`` and page counter values.

Eventually update associated targeting boxes.
weasyprint/css/targets.py