<?php

namespace Fotogenic_AI;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * Studio cache invalidator backed by the shared versioned cache store.
 */
final class Studio_Cache_Invalidator implements Studio_Cache_Invalidator_Interface {

	public function invalidate_product( int $product_id ): void {
		Studio_Cache_Store::flush_all_caches();
	}

	public function invalidate_latest_list(): void {
		Rest_Studio::bump_latest_products_cache_version();
	}
}
