18
18
*/
19
19
class SubresourceIntegrityRepository
20
20
{
21
- /**
22
- * Cache prefix.
23
- *
24
- * @var string
25
- */
26
- private const CACHE_PREFIX = 'INTEGRITY ' ;
27
21
28
22
/**
29
23
* @var array|null
@@ -35,11 +29,6 @@ class SubresourceIntegrityRepository
35
29
*/
36
30
private ?string $ context ;
37
31
38
- /**
39
- * @var CacheInterface
40
- */
41
- private CacheInterface $ cache ;
42
-
43
32
/**
44
33
* @var SerializerInterface
45
34
*/
@@ -53,20 +42,17 @@ class SubresourceIntegrityRepository
53
42
private File $ sriStorage ;
54
43
55
44
/**
56
- * @param CacheInterface $cache
57
45
* @param SerializerInterface $serializer
58
46
* @param SubresourceIntegrityFactory $integrityFactory
59
47
* @param string|null $context
60
48
* @param File|null $sriStorage
61
49
*/
62
50
public function __construct (
63
- CacheInterface $ cache ,
64
51
SerializerInterface $ serializer ,
65
52
SubresourceIntegrityFactory $ integrityFactory ,
66
53
?string $ context = null ,
67
54
? File $ sriStorage = null
68
55
) {
69
- $ this ->cache = $ cache ;
70
56
$ this ->serializer = $ serializer ;
71
57
$ this ->integrityFactory = $ integrityFactory ;
72
58
$ this ->context = $ context ;
@@ -196,21 +182,4 @@ private function getData(): array
196
182
197
183
return $ this ->data ;
198
184
}
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
- }
216
185
}
0 commit comments