mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
31 lines
705 B
PHP
31 lines
705 B
PHP
<?php
|
|
/*
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
|
|
namespace Magento\GraphQlCache\Model\CacheId;
|
|
|
|
use Magento\GraphQl\Model\Query\ContextInterface;
|
|
|
|
/**
|
|
* Interface for factors that should go into calculating the X-Magento-Cache-Id value used as a cache key
|
|
*/
|
|
interface CacheIdFactorProviderInterface
|
|
{
|
|
/**
|
|
* Name of the cache key
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getFactorName(): string;
|
|
|
|
/**
|
|
* Runtime value that should be used to store the result under
|
|
*
|
|
* @param ContextInterface $context
|
|
* @return string
|
|
*/
|
|
public function getFactorValue(ContextInterface $context): string;
|
|
}
|