Skip to content

Commit c127a55

Browse files
committed
AC-13833: Refactor SRI mechanism to use filesystem for storage.
1 parent 5e57b66 commit c127a55

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

app/code/Magento/Csp/Model/SubresourceIntegrityRepository.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
*/
1919
class SubresourceIntegrityRepository
2020
{
21-
/**
22-
* Cache prefix.
23-
*
24-
* @var string
25-
*/
26-
private const CACHE_PREFIX = 'INTEGRITY';
2721

2822
/**
2923
* @var array|null
@@ -35,11 +29,6 @@ class SubresourceIntegrityRepository
3529
*/
3630
private ?string $context;
3731

38-
/**
39-
* @var CacheInterface
40-
*/
41-
private CacheInterface $cache;
42-
4332
/**
4433
* @var SerializerInterface
4534
*/
@@ -53,20 +42,17 @@ class SubresourceIntegrityRepository
5342
private File $sriStorage;
5443

5544
/**
56-
* @param CacheInterface $cache
5745
* @param SerializerInterface $serializer
5846
* @param SubresourceIntegrityFactory $integrityFactory
5947
* @param string|null $context
6048
* @param File|null $sriStorage
6149
*/
6250
public function __construct(
63-
CacheInterface $cache,
6451
SerializerInterface $serializer,
6552
SubresourceIntegrityFactory $integrityFactory,
6653
?string $context = null,
6754
? File $sriStorage = null
6855
) {
69-
$this->cache = $cache;
7056
$this->serializer = $serializer;
7157
$this->integrityFactory = $integrityFactory;
7258
$this->context = $context;
@@ -196,21 +182,4 @@ private function getData(): array
196182

197183
return $this->data;
198184
}
199-
200-
/**
201-
* Gets a cache key based on current context.
202-
*
203-
* @return string
204-
* @deprecated Filesystem storage used instead of a cache
205-
*/
206-
private function getCacheKey(): string
207-
{
208-
$cacheKey = self::CACHE_PREFIX;
209-
210-
if ($this->context) {
211-
$cacheKey .= "_" . $this->context;
212-
}
213-
214-
return $cacheKey;
215-
}
216185
}

0 commit comments

Comments
 (0)